2892 Commits

Author SHA1 Message Date
Mitchell Hashimoto
0e4b91de88 macos: stylistic changes 2023-09-28 08:34:27 -07:00
Gregory Anders
137d24db9c macos: display keybinding instead of index in tab label 2023-09-28 08:28:46 -07:00
Gregory Anders
1fbd5e5590 macos: add keyEquivalent overload to also return modifier string 2023-09-28 08:28:46 -07:00
Gregory Anders
4837d840f6 macos: create modifier flags as OptionSet instead of from array
Nit picky change, but the OptionSet class (which NSEvent.ModifierFlags
is an instance of) has an API for incrementally setting values without
needing to create an array.
2023-09-28 08:28:46 -07:00
Gregory Anders
8f75e83958 macos: rename indexTabs() to relabelTabs()
This is a better name because the tab label may not necessarily be an
index (if a user binds some non-numeric key, for instance).
2023-09-28 08:28:46 -07:00
Gregory Anders
59ba6fac2b macos: add tab index labels 2023-09-28 08:28:46 -07:00
Mitchell Hashimoto
752aa11930 Merge pull request #575 from rockorager/dev
Revert default TERM to "xterm-ghostty"
2023-09-28 08:08:59 -07:00
Tim Culverhouse
d0c673cdfc terminfo: use 'xterm-ghostty' as primary name
Use "xterm-ghostty" as the primary terminfo name. This is a hack on a
hack...we use "xterm-ghostty" to prevent vim from breaking, and when we
do this as the default we break tcell-based applications (lazygit, aerc,
etc). tcell has a bug where the primary terminfo name must be the
value of TERM. https://github.com/gdamore/tcell/pull/639 fixes the issue
but is not merged yet.

Fixes: 779186ad ("config: add term config option")
2023-09-28 10:00:37 -05:00
Tim Culverhouse
c540d18095 config: default TERM to xterm-ghostty
Default the TERM value to "xterm-ghostty" to prevent breaking vim.
Consider changing back to ghostty in the future
2023-09-28 09:45:57 -05:00
Tim Culverhouse
5e473ebdb0 terminfo: add additional entries, fix smkx/rmkx
Add entries for secondary device attributes, XTVERSION.
2023-09-28 06:57:00 -05:00
Mitchell Hashimoto
6be4e4d45d Revert "macos: on Sonoma, manually add menu height padding for visible-menu"
This reverts commit 1dab2f9dd3bb19f8decc30826fd75d59bf412cc2.
2023-09-27 22:13:55 -07:00
Mitchell Hashimoto
fa56d6325e Merge pull request #569 from nfisher1226/expanded_tabs
(Gtk) Set tab labels to fill the available space, so that they will
2023-09-27 21:57:21 -07:00
Mitchell Hashimoto
0529c8bc28 terminfo: increase buffer size for test 2023-09-27 21:56:55 -07:00
Nathan Fisher
dca0ddb7e1 (Gtk) Set tab labels to fill the available space, so that they will
divide up the avialable horizontal area instead of leaving a large
empty space in the tab bar.
2023-09-28 00:10:07 -04:00
Mitchell Hashimoto
1942baefc6 Merge pull request #568 from rockorager/dev
terminfo: add mouse entries, correct kmouse
2023-09-27 19:45:10 -07:00
Tim Culverhouse
25710dfa6d terminfo: add mouse entries, correct kmouse
Add entries for XM and xm, these tell certain applications how to enable
mouse and the format of response they will receive.

Fix 'kmous' entry to match standard terminfo files.
2023-09-27 21:42:13 -05:00
Mitchell Hashimoto
a672519394 Merge pull request #567 from rockorager/dev
termio: reset mouse shape on terminal reset
2023-09-27 19:13:55 -07:00
Tim Culverhouse
0231c61a50 termio: reset mouse shape on terminal reset
Reset the mouse shape to `.default` when a full reset is done on the
terminal. Prevents the terminal from appearing to be in a persistent
hang
2023-09-27 20:51:31 -05:00
Mitchell Hashimoto
3188056bb2 Merge pull request #565 from mitchellh/macos-fs-menu
macos: custom fullscreen menu item to respect non-native fullscreen
2023-09-27 18:43:13 -07:00
Mitchell Hashimoto
c9b5e27f58 Merge pull request #564 from mitchellh/sonoma-fs
macos: on Sonoma, manually add menu height padding for visible-menu
2023-09-27 18:42:49 -07:00
Mitchell Hashimoto
21b46bd612 macos: change text to "toggle full screen" 2023-09-27 18:41:30 -07:00
Mitchell Hashimoto
57213547cd macos: custom fullscreen menu item to respect non-native fullscreen
Related to #392
2023-09-27 18:34:04 -07:00
Mitchell Hashimoto
1dab2f9dd3 macos: on Sonoma, manually add menu height padding for visible-menu
See the comment.
2023-09-27 18:17:35 -07:00
Mitchell Hashimoto
dcb25c6aa6 Merge pull request #563 from mitchellh/xtgettcap
Implement XTGETTCAP
2023-09-27 15:07:47 -07:00
Mitchell Hashimoto
1dcb23de0f termio/exec: need to defer deinit for DCS command 2023-09-27 14:52:13 -07:00
Mitchell Hashimoto
4724e0dcb4 terminfo: numeric comptime buffer only needs to be 10 bytes 2023-09-27 14:35:22 -07:00
Mitchell Hashimoto
28329761a7 terminfo: xtgettcap map name should use the source name 2023-09-27 14:30:27 -07:00
Mitchell Hashimoto
8208947290 termio/exec: hook up xtgettcap 2023-09-27 14:27:56 -07:00
Mitchell Hashimoto
a02378f969 terminfo: comptime map for xtgettcap results 2023-09-27 14:23:57 -07:00
Mitchell Hashimoto
823f47f695 termio: hook up dcs callbacks 2023-09-27 13:32:00 -07:00
Mitchell Hashimoto
032fcee9ff terminal: DCS handler, XTGETTCAP parsing 2023-09-27 12:07:31 -07:00
Mitchell Hashimoto
5e3f5e6c50 Merge pull request #559 from mitchellh/update-zig
update zig
2023-09-27 08:37:07 -07:00
Mitchell Hashimoto
695c50a73a update zig 2023-09-27 08:11:59 -07:00
Mitchell Hashimoto
850409b9be Merge pull request #550 from mitchellh/locale
Simplify setlocale logic to rely on libc to fail if invalid
2023-09-27 08:02:53 -07:00
Mitchell Hashimoto
1ce5341bb3 Merge pull request #558 from mitchellh/kitty-del
input: 0x7F is a control character, use helper
2023-09-27 08:00:47 -07:00
Mitchell Hashimoto
35a4427f54 input: 0x7F is a control character, use helper
Fixes #556

One check for control chars was missing 0x7F. Since we do this three
times, extract it to a helper and call that.
2023-09-27 07:57:21 -07:00
Mitchell Hashimoto
18b42ce6d5 Merge pull request #557 from rockorager/dev
terminfo: add bracketed paste entries BD, BE, PS, PE
2023-09-27 07:37:51 -07:00
Tim Culverhouse
fe0b93389e terminfo: add bracketed paste entries BD, BE, PS, PE
Add terminal entries for bracketed paste mode and start/end signals
2023-09-27 09:20:13 -05:00
Mitchell Hashimoto
0c74d13958 Merge pull request #554 from mitchellh/terminfo
terminfo: advertise OSC 52 support
2023-09-26 22:09:26 -07:00
Mitchell Hashimoto
767a78020a terminfo: add a few more missing entries from tmux(1) 2023-09-26 22:08:52 -07:00
Mitchell Hashimoto
ece4ddac81 terminfo: OSC 52 support 2023-09-26 21:56:22 -07:00
Mitchell Hashimoto
0ee0180032 Merge pull request #552 from rockorager/dev
terminal: rows created from IND should inherit the current bg attr
2023-09-26 21:39:05 -07:00
Tim Culverhouse
6b1d99dc6e terminal: rows created from IND should inherit the current bg attr
Any row created from scrolling via IND ("\x1BD") should have it's
background set as the current background. This can be verified in any
terminal with

  $ echo -e "\x1B[41m" && cat -v"

Followed by pressing enter to scroll the screen. We expect to see red
rows appear. Add test case to verify.

Fixes: alacritty/vim_large_screen_scroll
2023-09-26 22:10:05 -05:00
Mitchell Hashimoto
7d0d21fa07 Merge pull request #551 from mitchellh/shaper-alloc
font: shaper dynamically allocates cell buffer
2023-09-26 18:44:28 -07:00
Mitchell Hashimoto
5c1fbd09cd font: shaper dynamically allocates cell buffer
Pathlogical grapheme clusters can use a LOT of memory, so we need to be
able to grow.
2023-09-26 17:59:16 -07:00
Mitchell Hashimoto
0026c40062 Simplify setlocale logic to rely on libc to fail if invalid
Instead of checking if a locale is valid, let's change this logic:

  1. We first try setlocale to inherit from env vars, system default.
  2. Next, we fall back to unsetting LANG if it was set manually,
     allowing us to fall back to system defaults.
  3. We fall back to en_US.UTF-8.
2023-09-26 17:35:19 -07:00
Mitchell Hashimoto
0c9799ba61 Merge pull request #549 from mitchellh/paste
core: normalize newlines in non-bracketed pastes
2023-09-26 14:42:35 -07:00
Mitchell Hashimoto
010338354a core: normalize newlines in non-bracketed pastes
Fixes #547

For non-bracketed paste mode, "\r\n" => "\r" and "\n" => "\r". See the
issue for more supporting documentation.
2023-09-26 14:36:07 -07:00
Mitchell Hashimoto
7cb5c51be8 Merge pull request #546 from mitchellh/gtk-click-mods
apprt/gtk: detect keyboard modifier state for mouse events
2023-09-26 12:39:19 -07:00
Mitchell Hashimoto
8c4d25050a apprt/gtk: detect keyboard modifier state for mouse events 2023-09-26 12:37:59 -07:00