3633 Commits

Author SHA1 Message Date
Mitchell Hashimoto
c2086c4d18 Merge pull request #851 from mitchellh/gtk-tab-width
apprt/gtk: ensure equal tab width, truncate with ellipses
2023-11-09 11:16:04 -08:00
Mitchell Hashimoto
8c59d1176e apprt/gtk: ensure equal tab width, truncate with ellipses
Fixes #607
2023-11-09 11:12:55 -08:00
Mitchell Hashimoto
a4ca581219 font: load valid union field for loaded deferred fonts 2023-11-09 11:06:58 -08:00
Mitchell Hashimoto
6bf9c05f2a Merge pull request #847 from mitchellh/font-preso
font: if VS15/16 not specified, prefer any presentation in explicitly requested font
2023-11-08 22:12:32 -08:00
Mitchell Hashimoto
3d8dd0783a font: if VS15/16 not specified, prefer any presentation in explicit font
Fixes #845

Quick background: Emoji codepoints are either default text or default
graphical ("Emoji") presentation. An example of a default text emoji
is ❤. You have to add VS16 to this emoji to get: ❤️. Some font are
default graphical and require VS15 to force text.

A font face can only advertise text vs emoji presentation for the entire
font face. Some font faces (i.e. Cozette) include both text glyphs and
emoji glyphs, but since they can only advertise as one, advertise as
"text".

As a result, if a user types an emoji such as 👽, it will fallback to
another font to try to find a font that satisfies the "graphical"
presentation requirement. But Cozette supports 👽, its just advertised
as "text"!

Normally, this behavior is what you want. However, if a user explicitly
requests their font-family to be a font that contains a mix of test and
emoji, they _probably_ want those emoji to be used regardless of default
presentation. This is similar to a rich text editor (like TextEdit on
Mac): if you explicitly select "Cozette" as your font, the alien emoji
shows up using the text-based Cozette glyph.

This commit changes our presentation handling behavior to do the
following:

  * If no explicit variation selector (VS15/VS16) is specified,
    any matching codepoint in an explicitly loaded font (i.e. via
    `font-family`) will be used.

  * If an explicit variation selector is specified or our explicitly
    loaded fonts don't contain the codepoint, fallback fonts will be
    searched but require an exact match on presentation.

  * If no fallback is found with an exact match, any font with any
    presentation can match the codepoint.

This commit should generally not change the behavior of Emoji or VS15/16
handling for almost all users. The only users impacted by this commit
are specifically users who are using fonts with a mix of emoji and text.
2023-11-08 21:55:20 -08:00
Mitchell Hashimoto
4a89d4a8b9 Merge pull request #846 from gpanders/terminfo-focus
terminfo: add entries for focus reporting
2023-11-08 13:42:59 -08:00
Gregory Anders
1aef1f0049 terminfo: add entries for focus reporting
These sequences have been used "informally" forever, and until recently
mode 1004 was included in Xterm's XM (enable mouse reporting) sequence.
But as of ncurses 6.4 patch 20231028, focus reporting mode is removed
from XM and added to new fe and fd capabilities. Xterm also includes
definitions for the actual focus events ("kxIN" and "kxOUT"), so include
those too.
2023-11-08 15:05:34 -06:00
Mitchell Hashimoto
244cc6b457 Merge pull request #842 from NgoHuy/fix-#727
Add keymap for some kp_*
2023-11-08 09:38:09 -08:00
Mitchell Hashimoto
0c695f3510 apprt/gtk: add comment about key aliases 2023-11-08 09:37:53 -08:00
Mitchell Hashimoto
1011cb3f1c Merge pull request #844 from gpanders/tab-label-constraints
macos: ensure tab labels are always visible
2023-11-08 09:22:14 -08:00
Gregory Anders
dffb5e9f15 macos: ensure tab labels are always visible
This tells AppKit to give the tab labels higher priority than the tab
titles. When the tabs become small, this causes the tab title text to be
truncated instead of dropping the tab label.

Fixes: https://github.com/mitchellh/ghostty/issues/843
2023-11-08 08:48:20 -06:00
Severus
3497fec7df Add keymap for KP_*
We miss some kp_* like: kp_home, kp_end, kp_up, kp_down, kp_page_up, kp_page_down, kp_left, kp_right.
Then we map those keys in gtk runtime.
2023-11-08 14:43:00 +07:00
Mitchell Hashimoto
e542215c21 macos: update xib version from xcode 2023-11-07 19:26:52 -08:00
Mitchell Hashimoto
d0666e523f config: packed struct fields can clone directly via copy 2023-11-07 17:09:03 -08:00
Mitchell Hashimoto
bb39bab5dc Merge pull request #839 from rockorager/no-cursor
shell-integration: implement "no-cursor" option
2023-11-07 17:07:09 -08:00
Mitchell Hashimoto
18c852d47c config: switch shell-integration-features 2023-11-07 17:05:09 -08:00
Mitchell Hashimoto
8cd3b65d0a config: packed struct of bools supported as config field 2023-11-07 15:59:56 -08:00
Mitchell Hashimoto
1a92b97c52 Merge pull request #838 from gpanders/equalize-splits
macos: add key binding for equalizing split sizes
2023-11-07 15:27:04 -08:00
Mitchell Hashimoto
d482fed7f2 simplify some swift 2023-11-07 15:26:41 -08:00
Tim Culverhouse
4fac674016 shell-integration: implement "no-cursor" option
Implement a "no-cursor" option for shell integration. This option acts
like "detect" but doesn't set the cursor shape.
2023-11-07 16:31:07 -06:00
Gregory Anders
cd01340cce macos: add key binding for equalizing split sizes 2023-11-07 16:23:28 -06:00
Mitchell Hashimoto
36dd5ef4ee Merge pull request #837 from mitchellh/utf8proc-kill
replace utf8proc with ziglyph
2023-11-07 13:26:12 -08:00
Mitchell Hashimoto
4781a83e4a replace utf8proc with ziglyph 2023-11-07 13:17:56 -08:00
Mitchell Hashimoto
2998f1a18e Merge pull request #834 from gpanders/split-binding
macos: pass split as a binding to SplitView
2023-11-07 09:58:46 -08:00
Gregory Anders
dc7c313166 macos: pass split as a binding to SplitView
Fixes: https://github.com/mitchellh/ghostty/issues/833
2023-11-07 11:55:29 -06:00
Mitchell Hashimoto
b21ee6617e Merge pull request #609 from rockorager/dev
Update mouse shape based on ability to use native text selection
2023-11-06 14:42:38 -08:00
Mitchell Hashimoto
d20c4866b1 some comments, make switch exaustive 2023-11-06 14:42:10 -08:00
Tim Culverhouse
9a64697433 mouse: set mouse to text when bypassing mouse reporting
When shift is held, we are bypassing mouse reporting mode. Change the
cursor to text to indicate this to the user. On release, change back to
whatever we were before.
2023-11-06 14:36:59 -08:00
Tim Culverhouse
c96cedcf22 mouse: set mouse as text only when not reporting mouse events
The selection mode is only valid when mouse reporting events are on. If
we have any mouse reporting events turned on, reset the mouse shape back
to default (a pointer).
2023-11-06 14:36:59 -08:00
Tim Culverhouse
49fb5c8688 gtk(mouse): use "text" enum as default value
Use the .text field of the enum as the default value of the mouse shape
instead of renaming .default. Store the default value as the current
value for use in subsequent commits
2023-11-06 14:36:57 -08:00
Mitchell Hashimoto
821a243239 Merge pull request #829 from mitchellh/blink
termio: cursor-style-blink being set disables DEC mode 12
2023-11-06 12:09:28 -08:00
Mitchell Hashimoto
268d39fe75 termio: cursor-style-blink being set disables DEC mode 12
Fixes #820

See the very long comment in termio/Exec.zig.
2023-11-06 12:06:11 -08:00
Mitchell Hashimoto
e343d6883d Merge pull request #827 from mitchellh/mods-alias
input: allow modifier aliases
2023-11-06 11:58:40 -08:00
Mitchell Hashimoto
97b1f97f6c Merge pull request #828 from gpanders/main
terminfo: fixup Sync terminfo string
2023-11-06 11:52:00 -08:00
Gregory Anders
f58478822c terminfo: fixup Sync terminfo string
The closing string on a conditional is "%;", not "%".
2023-11-06 13:48:01 -06:00
Mitchell Hashimoto
0ec225683e input: allow modifier aliases
Fixes #824
2023-11-06 11:42:51 -08:00
Mitchell Hashimoto
61b24a2f5c Merge pull request #826 from gpanders/empty-clipboard
macos: complete clipboard request even when clipboard is empty
2023-11-06 11:26:30 -08:00
Gregory Anders
8349d82179 macos: complete clipboard request even when clipboard is empty 2023-11-06 13:10:23 -06:00
Mitchell Hashimoto
4e3ab4879d Merge pull request #822 from gpanders/split-resizing
macos: implement split resizing
2023-11-06 09:35:43 -08:00
Mitchell Hashimoto
7be5eba9cb input: unit tests for pasing tuples 2023-11-06 09:23:24 -08:00
Mitchell Hashimoto
1ff81682f7 input: add format support for tuple args 2023-11-06 09:19:59 -08:00
Mitchell Hashimoto
bc0d1a9255 macos: remove focused cell size resize increment setter 2023-11-06 09:11:50 -08:00
Mitchell Hashimoto
1ff0573518 macos: use normal swiftui parameters for resizable publisher/inc 2023-11-06 09:06:20 -08:00
Mitchell Hashimoto
f8b0654a19 Merge pull request #816 from Raiden1411/feat/options
feat: add support for `--fullscreen`, `--title` and `--class` values
2023-11-06 08:55:33 -08:00
Mitchell Hashimoto
f338c09506 apprt/gtk: move default id into scope 2023-11-06 08:55:13 -08:00
Mitchell Hashimoto
364a14d7a2 apprt/gtk: fix valid id check 2023-11-06 08:54:23 -08:00
Mitchell Hashimoto
efe9721c98 macos: honor fullscreen setting 2023-11-06 08:52:36 -08:00
Mitchell Hashimoto
3564dd5e7e stylistic changes 2023-11-06 08:47:09 -08:00
Raiden1411
e9535a8d3e chore: cleanup 2023-11-06 14:28:48 +00:00
Raiden1411
d2d5d4ba82 chore: cleanup 2023-11-06 14:27:36 +00:00