4145 Commits

Author SHA1 Message Date
Mitchell Hashimoto
2c541a7e86 config: -e replaces previous args 2023-10-27 18:26:44 -07:00
Mitchell Hashimoto
4f62526782 config: tests for -e parsing 2023-10-27 18:24:13 -07:00
Gregory Anders
3d898bf30d terminfo: remove focus reporting mode from XM entry (#748)
The XM entry enables mouse reporting events to applications. An
application that supports mouse events may not necessarily support focus
events, so these should not be bundled together.

Vim includes focus reporting mode (1004) in their example XM entry in
their docs [1], but they do not actually use it in the default value XM
value [2].

Ncurses also includes only modes 1000 and (optionally) mode 1006 in
their mouse driver [3]. The ncurses documentation for XM similarly does
not mention focus reporting (mode 1004) anywhere [4].

Including focus reporting causes bugs in some programs that want to use
mouse mode but do not handle focus events (e.g. `htop`).

[1]: https://vimhelp.org/term.txt.html#xterm-terminfo-entries
[2]: 87ca5e86fa/src/term.c (L477)
[3]: 87c2c84cbd/doc/html/man/curs_mouse.3x.html (L339)
[4]: https://www.man7.org/linux/man-pages/man5/user_caps.5.html
2023-10-27 17:40:41 -07:00
Mitchell Hashimoto
4104f78cba cli: handle "-e" as the command to execute 2023-10-27 15:57:20 -07:00
Mitchell Hashimoto
9c56bd5dba config: command-arg to specify arguments to the executed command
Fixes #744
2023-10-27 15:38:50 -07:00
Mitchell Hashimoto
6db0d9c004 Merge pull request #746 from psnszsn/main
apprt/gtk: handle surface scale changes
2023-10-27 15:20:13 -07:00
Mitchell Hashimoto
d5405e1a1c Merge pull request #747 from mitchellh/macos-tab-cascade
macos: set proper cascade point when closing tab in window
2023-10-27 15:11:42 -07:00
Mitchell Hashimoto
423d0d58c0 build: do not build glfw for gtk anymore 2023-10-27 15:11:04 -07:00
Mitchell Hashimoto
25e3b21eae apprt/gtk: comment about future API 2023-10-27 15:09:52 -07:00
Mitchell Hashimoto
b985b28918 apprt/gtk: use gtk widget scale to get content scale 2023-10-27 15:03:41 -07:00
Mitchell Hashimoto
6504a67f0b macos: set proper cascade point when closing tab in window
Fixes #745
2023-10-27 14:56:30 -07:00
Vlad Pănăzan
ffaa7e11e2 apprt/gtk: handle surface scale changes 2023-10-27 23:27:53 +02:00
Mitchell Hashimoto
8822077a10 Merge pull request #743 from mitchellh/header-deco
apprt/gtk: only create window header bar with window decorations
2023-10-27 10:10:02 -07:00
Mitchell Hashimoto
cf6ee6ed14 apprt/gtk: only create window header bar with window decorations
Fixes #737
2023-10-27 10:08:59 -07:00
Mitchell Hashimoto
a01562a52b Merge pull request #742 from mitchellh/fuzz-crashes
Fix more fuzz crashes
2023-10-27 09:46:10 -07:00
Mitchell Hashimoto
069e16cb46 terminal: restore cursor should clamp x/y 2023-10-27 09:42:39 -07:00
Mitchell Hashimoto
306689b8a4 terminal: sgr direct bg also had wrong slice len 2023-10-27 09:27:45 -07:00
Mitchell Hashimoto
d28e6739c7 terminal: sgr direct color fg missing color doesn't crash 2023-10-27 09:25:16 -07:00
Mitchell Hashimoto
0b6cbfa141 terminal: only clear spacer tail if exists 2023-10-27 09:14:53 -07:00
Mitchell Hashimoto
4c45bfec9e terminal: improve some debug logging 2023-10-27 09:14:29 -07:00
Mitchell Hashimoto
597f95120b terminal: ECH minimum count is 1 2023-10-27 08:50:05 -07:00
Mitchell Hashimoto
3a77df7ce2 terminal: in mode 2027, do not attach any width=0 char unless grapheme 2023-10-27 08:23:43 -07:00
Mitchell Hashimoto
9330b25f1a config: make step resize opt-in for macos 2023-10-27 08:18:32 -07:00
Mitchell Hashimoto
403fac15f1 Merge pull request #735 from gpanders/resize-increments
macos: set window resizeIncrements when cell size changes
2023-10-27 08:09:00 -07:00
Mitchell Hashimoto
9b63da2ea7 config: slighty copy editing 2023-10-27 08:08:43 -07:00
Gregory Anders
9d2d9ca7a3 maacos: update doc comment for PrimaryView.window 2023-10-27 10:07:15 -05:00
Gregory Anders
add2b675bd config: add window-step-resize option 2023-10-27 09:33:56 -05:00
Gregory Anders
0f73bf32e6 macos: document SurfaceView.cellSize property 2023-10-27 09:23:17 -05:00
Mitchell Hashimoto
578dd730f9 terminal: CUB with reverse wrap on first row should not crash 2023-10-26 23:01:55 -07:00
Mitchell Hashimoto
ea1ef0641d terminal: assertion should check x is on left margin 2023-10-26 22:52:12 -07:00
Mitchell Hashimoto
67f23342a1 Merge pull request #736 from mitchellh/xtrevwrap2-large
terminal: clamp cursor left above scroll region with XTREVWRAP2
2023-10-26 22:49:56 -07:00
Mitchell Hashimoto
9c165ecbd2 terminal: clamp cursor left above scroll region with XTREVWRAP2
Fixes a crash found through fuzzing. This crash is also exhibited in
xterm (as of v384). The issue arises when you set the cursor above the top
scroll margin, then issue a large cursor left (CSI D) with extended reverse
wrap (?1045) set. Extended reverse wrap loops back until it reaches the top
scroll then wraps around. But since the cursor is before the top scroll,
xterm just arbitrarily moves back into negative row numbers, which reads into
bad memory.

We decided to fix this by clamping to (0,0) and exiting because this
will mimic the xterm behavior for valid values of cursor left count
(prior to crashing).
2023-10-26 22:38:33 -07:00
Gregory Anders
2ee80a52df macos: set window resizeIncrements when cell size changes
The resizeIncrements property is only modified when the cell size of the
focused window changes. If two splits have the same cell size then the
property is not modified when focusing between the two splits.
2023-10-26 20:27:58 -05:00
Mitchell Hashimoto
be46bea40f macos: fix warning from xcode 2023-10-26 14:45:55 -07:00
Mitchell Hashimoto
3d3abfd3b4 Merge pull request #733 from mitchellh/insp-crash
Fix inspector toggle crash, default keybinds to match Chromium
2023-10-26 14:44:47 -07:00
Mitchell Hashimoto
63854cbd3a config: default inspector keybind to same as chromium 2023-10-26 14:43:09 -07:00
Mitchell Hashimoto
5d062947da core: check for inspector activity before recording event
Fixes #732
2023-10-26 14:40:25 -07:00
Mitchell Hashimoto
a7a27f364e Merge pull request #730 from mitchellh/update-zig
update zig
2023-10-26 10:51:46 -07:00
Mitchell Hashimoto
b146f95402 update zig 2023-10-26 10:42:33 -07:00
Mitchell Hashimoto
28aace4393 Merge pull request #728 from mitchellh/cimgui
Terminal Inspector v1
2023-10-26 10:12:39 -07:00
Mitchell Hashimoto
0fdf08e443 Merge pull request #729 from truemedian/fuzz
resolve simple crashes
2023-10-26 10:02:48 -07:00
Mitchell Hashimoto
0baf3522b4 terminal: bring back unimplemented logs 2023-10-26 09:53:57 -07:00
Mitchell Hashimoto
99591f280b terminal: addWithOverflow to detect max int 2023-10-26 09:50:29 -07:00
Mitchell Hashimoto
2fd2693693 termio: MessageData should pick appropriately sized int for len 2023-10-26 09:36:56 -07:00
Mitchell Hashimoto
b049cb7d21 command: allow relative paths in PATH 2023-10-26 09:30:11 -07:00
Nameless
41de71ae9e fuzz: termio.MessageData small_size is max of 255, not 256 2023-10-25 11:44:21 -05:00
Nameless
49f1866f28 add tests for fuzzed results, clean up unimplemented osc warning 2023-10-25 11:44:16 -05:00
Nameless
81f7ae63b0 fuzz: src/terminal/stream.zig
osc.zig: undefined pointer was dereferenced when warning was issued
for handler missing
Parser.zig: too many parameters was not handled in the final case
Parser.zig: parameters being too long (>255 digits) was not handled
2023-10-25 11:42:13 -05:00
Mitchell Hashimoto
c12bb4a035 inspector: reset vt seq number on clear 2023-10-25 09:24:37 -07:00
Mitchell Hashimoto
1696cf76b6 macos: free inspector when it is hidden 2023-10-25 09:09:10 -07:00