5828 Commits

Author SHA1 Message Date
Qwerasd
dfc0894d5d fix(renderer): make all decorations and combining marks visible under cursor
Metal needed to be changed to account for wide chars having decorations
on the right half and OpenGL needed to account for multiple glyphs being
under the cursor at once (decorations and combining marks) as well as
wide chars.
2024-10-02 17:18:26 -04:00
Qwerasd
f9e2cb6aec fix(renderer): use 1-wide ul/st chars, ignore null shaper cells
This makes sure that underline styles are consistent and not stretched,
and avoids rendering overlapping text decorations or extraneous
background cells for the right halves of wide chars.
2024-10-02 16:38:31 -04:00
Mitchell Hashimoto
28ec11e52b docs updates 2024-10-02 10:52:59 -07:00
Roland Peelen
9e00eeff86 Review Feedback - formatting / docs 2024-10-02 10:33:36 -07:00
Roland Peelen
2dbd46096f Fix typo 2024-10-02 10:33:36 -07:00
Roland Peelen
24ba1a6100 Add action on Zig side 2024-10-02 10:33:36 -07:00
Mitchell Hashimoto
66f2d75ddd Change copy-on-select behavior to be more idiomatic for Linux
Fixes #2345

The new docs for `copy-on-select`:

Whether to automatically copy selected text to the clipboard. `true`
will prefer to copy to the selection clipboard if supported by the
OS, otherwise it will copy to the system clipboard.

The value `clipboard` will always copy text to the system clipboard
(for supported systems) as well as the system clipboard. This is sometimes
a preferred behavior on Linux.

Middle-click paste will always use the selection clipboard on Linux
and the system clipboard on macOS. Middle-click paste is always enabled
even if this is `false`.

The default value is true on Linux and false on macOS. macOS copy on
select behavior is not typical for applications so it is disabled by
default. On Linux, this is a standard behavior so it is enabled by
default.
2024-10-01 20:38:27 -07:00
Mitchell Hashimoto
46cbe59076 macos: quick terminal supports fullscreen
Fixes #2330

The quick terminal now supports fullscreen. The fullscreen mode is
always non-native due to the quick terminal being a titleless, floating
window.

When the quick terminal loses focus and animates out, it will always
exit fullscreen mode.
2024-09-30 21:07:16 -07:00
Mitchell Hashimoto
4b9a3aaaa2 Merge pull request #2337 from ghostty-org/nonnative
macOS: fullscreen implementation improvements
2024-09-30 20:17:10 -07:00
Mitchell Hashimoto
22b9f24978 macos: clarify comments, clean up notifications for fullscreen 2024-09-30 20:10:23 -07:00
Mitchell Hashimoto
045ecacd8c macos: fullscreen mode can be changed at runtime 2024-09-30 10:31:11 -07:00
Paul Berg
aa10e5160b cli: handle mouse scroll before setting window 2024-09-30 11:02:32 +02:00
Mitchell Hashimoto
99a1dbdf46 Merge pull request #2322 from Syphdias/fix_2271
Split GDK environment variables
2024-09-29 09:48:56 -07:00
Mitchell Hashimoto
bbacee66d0 font/sprite: fix out of bounds right on curly underline
Fixes #2321
2024-09-29 09:39:32 -07:00
Mitchell Hashimoto
f67a647a12 font/sprite: bounds checking for pixel writes on Pixman 2024-09-29 09:38:38 -07:00
Christian Kugler
f9d3f64978 Merge branch 'main' into fix_2271 2024-09-29 14:15:56 +02:00
Christian Kugler
f309d4191e Use helper function to set correct env variables
GTK4 version 4.16 split the environment variable `GDK_DEBUG` into `GDK_DEBUG`
and `GDK_DISABLE`. This is being done by using the helper function `atLeast` to
handle certain versions accordingly.

`GSK_RENDERER` also only needs to be set in later GTK versions (>=1.14.0).
2024-09-29 14:04:13 +02:00
Mitchell Hashimoto
4796583a51 Merge pull request #2320 from ghostty-org/slideterm
macOS: Quick Terminal ("Quake-style" terminal)
2024-09-28 21:20:00 -07:00
Mitchell Hashimoto
4f9d49b380 macos: handle multiple monitors properly 2024-09-28 20:52:22 -07:00
Mitchell Hashimoto
1f3c3dde10 input: note fullscreen isn't supported by quick terminal 2024-09-28 18:51:47 -07:00
Mitchell Hashimoto
11d5ec7dc1 config: support quick terminal position 2024-09-28 18:42:25 -07:00
Mitchell Hashimoto
1570ef01a7 rename slide to quick terminal 2024-09-28 15:20:35 -07:00
Mitchell Hashimoto
86e98c8403 Merge pull request #2313 from rockorager/sgr-21
sgr: add support for legacy double underline
2024-09-28 10:34:54 -07:00
Jeffrey C. Ollie
9f543ceac2 cli: fix integer overflow in +list-themes if window is too narrow
Reproduction is to resize the window to it's minimum width and then
run `ghostty +list-themes`. Ghostty will crash because Zig for loops
don't like having a range where the end is smaller than the start.
2024-09-28 12:12:00 -05:00
Tim Culverhouse
93643d1741 sgr: add support for legacy double underline
SGR 21 is defined to be a double underline. This behavior is common
among many terminals, notably xterm.

References: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_
2024-09-27 22:22:22 -05:00
Mitchell Hashimoto
7806366eec core: fix up toggle_slide_terminal action for rebase 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
cadb960ef9 core: slide terminal keybinding action 2024-09-27 18:36:06 -07:00
Mitchell Hashimoto
576453cfde apprt/gtk: set null url if url is empty
Fixes #2306
2024-09-27 18:34:08 -07:00
Mitchell Hashimoto
6d68db3bdc core: only extend selection on mouse if click interval is exceeded
Previously, once we had one click registered, shift+click would always
go into selection extend mode. This is not the behavior we want, since
we want shift+double/triple click to work in alternate screens.

This commit changes the behavior so that we only extend the selection
after the multi-click interval has passed.

I see a lot of opportunity to improve this whole callback much more but
I don't want to risk introducing new bugs since this is a hard to test
area, so I'm going to leave it for now.
2024-09-27 14:21:27 -07:00
Mitchell Hashimoto
f6f91b5eb5 core: fix invalid action call that wasn't setting our metrics properly
Fixes #2308
2024-09-27 12:28:15 -07:00
Mitchell Hashimoto
7befb5a418 macos: fix previous/next tab bindings, improve action logging 2024-09-27 12:24:11 -07:00
Jeffrey C. Ollie
a969364f93 cli/list-themes: add ability to search theme names 2024-09-27 10:53:58 -07:00
Jeffrey C. Ollie
e313352c1f cli: update +list-themes --help text 2024-09-27 10:53:58 -07:00
Jeffrey C. Ollie
a6a4f9ff8e cli: list-themes should list symlinks
Symbolic links should be listed in addition to normal files. Useful
for system like home-manager that link config files to location in the
Nix store.
2024-09-27 10:53:58 -07:00
Jeffrey C. Ollie
743e547235 cli: "fancy" theme preview
This adds a "fancy" theme preview to the `+list-themes` CLI action.
By default, if the command is connected to a TTY, it will display the
fancy preview. If it is not connected to a TTY, or the user specifies
`--plain` on the command line, a simple list of themes will be printed
to stdout.

While in the preview `F1` or `?` will show a help screen.
2024-09-27 10:53:58 -07:00
Mitchell Hashimoto
08ee32b633 Forward std_options from entrypoint in main.zig 2024-09-27 10:51:19 -07:00
Mitchell Hashimoto
be0d71f62d apprt/embedded: add the tab overview to the enum 2024-09-27 10:15:16 -07:00
Paul Berg
f1474c220d bind: add toggle_tab_overview binding 2024-09-27 10:13:05 -07:00
Paul Berg
7b8b58110c apprt/gtk: store tab_overview in Window struct 2024-09-27 10:12:08 -07:00
Paul Berg
6ef87d298c apprt/gtk: remove Window.hasAdwToolbar
this is the same as isAdwWindow
2024-09-27 10:12:08 -07:00
Paul Berg
fe4f4fdc72 apprt/gtk: fix build with -Dgtk-libadwaita=false 2024-09-27 10:12:08 -07:00
Mitchell Hashimoto
4ae20212bf libghostty: unified action dispatch
First, this commit modifies libghostty to use a single unified action
dispatch system based on a tagged union versus the one-off callback
system that was previously in place. This change simplifies the code on
both the core and consumer sides of the library. Importantly, as we
introduce new actions, we can now maintain ABI compatibility so long as
our union size does not change (something I don't promise yet).

Second, this moves a lot more of the functions call on a surface into
the action system. This affects all apprts and continues the previous
work of introducing a more unified API for optional surface features.
2024-09-26 22:00:11 -07:00
Mitchell Hashimoto
84e0a05027 Merge pull request #2295 from qwerasd205/underlines
Various underline (and strikethrough) improvements
2024-09-26 14:54:43 -07:00
Mitchell Hashimoto
3b419a2ba2 apprt/gtk: handle zero value notification pointers 2024-09-26 14:40:33 -07:00
Mitchell Hashimoto
4cc4eb5ed0 core: remove more hasdecls 2024-09-26 14:21:06 -07:00
Mitchell Hashimoto
4e2781fdec apprt/gtk 2024-09-26 14:13:18 -07:00
Mitchell Hashimoto
e29918ebb8 core: more actions 2024-09-26 10:20:44 -07:00
Mitchell Hashimoto
9202cba1f5 core: many more actions 2024-09-26 10:05:10 -07:00
Mitchell Hashimoto
1e010b8e08 core: more actions 2024-09-26 09:37:31 -07:00
Mitchell Hashimoto
26cba70b69 core: no need for hasTabs apprt function 2024-09-26 08:34:20 -07:00