4231 Commits

Author SHA1 Message Date
Mitchell Hashimoto
5057b1bf76 Merge pull request #1012 from mitchellh/close-keybinding
core: detect inputs that result in surface close and avoid segfault
2023-12-07 10:39:32 -08:00
Mitchell Hashimoto
9de5d991a2 core: detect inputs that result in surface close and avoid segfault
Fixes #965

When processing keybindings that closed the surface (`close_surface`,
`close_window`), the surface and associated runtime structures would be
freed so we could segfault.

This PR introduces a new enum result for input events (only key for now)
that returns whether an event resulted in a close. In this case, callers
can properly return immediately and avoid writing to deallocated memory.
2023-12-07 10:24:39 -08:00
Mitchell Hashimoto
571170c574 Merge pull request #1003 from mitchellh/update-zig
update zig
2023-12-07 08:05:57 -08:00
Mitchell Hashimoto
53c23b7245 update zig 2023-12-06 22:12:36 -08:00
Mitchell Hashimoto
91fced7b05 Merge pull request #1002 from mitchellh/mrn/update-zls
nix: update ZLS
2023-12-06 22:07:20 -08:00
Thorsten Ball
7b70df3952 nix: update ZLS 2023-12-07 06:28:51 +01:00
Mitchell Hashimoto
219aa3a156 Merge pull request #990 from mitchellh/mrn/gtk-resize-splits
gtk: add support for resizing splits via keybinds
2023-12-06 20:53:45 -08:00
Mitchell Hashimoto
3c4bd47de3 apprt/gtk: stylistic changes 2023-12-06 20:53:32 -08:00
Mitchell Hashimoto
25231cfbc4 Merge pull request #1000 from mitchellh/packages-default
Add packages.default property
2023-12-06 13:36:13 -08:00
RGBCube
c86c558571 Add packages.default property
This is useful for doing `nix run $flakeref` and other nix tools
2023-12-06 23:50:44 +03:00
Mitchell Hashimoto
fe52ea0909 Merge pull request #998 from RGBCube/main
Quote URLs in NixOS example
2023-12-06 12:01:31 -08:00
RGBCube
5ccf76e849 Quote URLs in NixOS example 2023-12-06 22:52:52 +03:00
Mitchell Hashimoto
8bd6b0697b Merge pull request #997 from mitchellh/mods-change
core: mods change doesn't unhide mouse
2023-12-06 11:39:09 -08:00
Mitchell Hashimoto
29312e76e5 core: mods change doesn't unhide mouse
Fixes #989
2023-12-06 11:38:26 -08:00
Mitchell Hashimoto
fe3b12c1b4 font: use nerd font patched jetbrains font
Fixes #996
2023-12-06 11:20:07 -08:00
Mitchell Hashimoto
5ef7fd1dc8 Merge pull request #995 from mitchellh/macos-preedit-bs
macos: if a preedit state is cleared, don't send key event
2023-12-06 09:06:12 -08:00
Mitchell Hashimoto
7ea0dfdd5d macos: if a preedit state is cleared, don't send key event
Fixes #992
2023-12-06 09:04:59 -08:00
Mitchell Hashimoto
68b4ca3981 Merge pull request #994 from mitchellh/firacode
Remove FiraCode leftovers
2023-12-06 08:51:51 -08:00
Carlos Alexandro Becker
25856d62aa Remove FiraCode leftovers
from #993

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-06 13:36:05 -03:00
Mitchell Hashimoto
ea3d32e8a4 Merge pull request #993 from mitchellh/default-font
change default embedded font to JetBrains Mono
2023-12-06 08:10:57 -08:00
Mitchell Hashimoto
55ba15fe66 change default embedded font to JetBrains Mono
Fixes #991

This changes the default embedded font from Fira to JetBrains Mono. This
only affects users who don't specify or font AND Ghostty can't find
another default font to use on their system.

This is one part an aesthetic choice: I've grown to personally like
JetBrains Mono more than Fira, and I think I have the right to change
the defaults ;)

But this is also partly because of #991: FiraCode contains glyphs for
symbolic ranges. This may not be Fira official... I think I may have
used a Nerd font patched one and that may be the issue. So I don't want
to blame the Fira font project. BUT, we have to replace the ttf in our
project and since I've been meaning to switch to JB Mono I just did that
now.
2023-12-06 08:08:14 -08:00
Thorsten Ball
40e239bf7a gtk: add support for resizing splits via keybinds
This adds support for resizing splits via keybinds to the GTK runtime.

Code is straightforward. I couldn't see a way to do it without keeping
track of the orientation of the splits, but I think that's fine.
2023-12-06 06:25:34 +01:00
Mitchell Hashimoto
824d0c5cd5 Merge pull request #988 from mitchellh/scroll-cursor-key
core: alternate scroll encoding should respect DECCKM
2023-12-05 09:51:35 -08:00
Mitchell Hashimoto
534de78d37 core: alternate scroll encoding should respect DECCKM 2023-12-05 09:43:53 -08:00
Mitchell Hashimoto
95d426739d Merge pull request #987 from rockorager/mode-1047
terminal: implement mode 1047 (alternate screen)
2023-12-05 09:36:10 -08:00
Tim Culverhouse
c9f2f806ec terminal: implement mode 1047 (alternate screen)
Implement handling of mode 1047, which enters the alternate screen. This
is not used often, typically applications will favor 1049 (enter alt
screen, save cursor, clear alt screen).
2023-12-05 10:37:11 -06:00
Mitchell Hashimoto
f12371ec1c Revert "Revert "ci: use Cirrus macOS VMs (#985)""
This reverts commit 7022fe86d52bece810a4b15354dc693cc1483ae1.
2023-12-04 11:01:19 -08:00
Mitchell Hashimoto
7022fe86d5 Revert "ci: use Cirrus macOS VMs (#985)"
This reverts commit 0da12bd10eb81090d9b6ed919befd7bdd37caf6d.

Secret access failed, we'll add this back once that is fixed.
2023-12-03 21:18:26 -08:00
Mitchell Hashimoto
c108b8797f Merge pull request #986 from mitchellh/preedit-alloc
remove length limit on preedit text, handle widths larger than screen
2023-12-03 20:46:33 -08:00
Mitchell Hashimoto
0da12bd10e ci: use Cirrus macOS VMs (#985) 2023-12-03 20:46:01 -08:00
Mitchell Hashimoto
0fc6076ee5 renderer: default codepoints for preedit 2023-12-03 20:28:28 -08:00
Mitchell Hashimoto
56c6c096fa renderer: handle scenarios the preedit text is wider than our screen 2023-12-03 20:16:49 -08:00
Mitchell Hashimoto
0cdefe8b8b core: remove size limit on preedit length by heap allocating
Fixes #882

We previously had a hardcoded limit of 16 codepoints. In #882, a user
pointed out that in Chinese, is reasonable for a preedit input to be
longer than this.

To avoid any future issues, this commit moves to a heap-allocated
variant. Preedits aren't that common, they aren't high throughput, and
they're generally pretty small, so using a heap allocation is fine. The
memory is owned by the person who set it.
2023-12-03 19:54:26 -08:00
Mitchell Hashimoto
e80f974b24 Merge pull request #984 from vancluever/vancluever-update-nixpkgs-zig-0-12
nix: update nixpkgs-zig-0-12
2023-12-03 19:35:20 -08:00
Chris Marchesi
dae92039c7 nix: update nixpkgs-zig-0-12
Just updates the input so that we're on the same Zig nightly as
zig-overlay (#983).
2023-12-02 19:52:22 -08:00
Mitchell Hashimoto
fd2069f6d2 Merge pull request #983 from mitchellh/update-zig
update zig version
2023-12-02 12:35:28 -08:00
Mitchell Hashimoto
8507459e65 update zig version 2023-12-02 12:14:24 -08:00
Mitchell Hashimoto
b29c7d11cd Merge pull request #982 from mitchellh/font-metrics
font: faces use primary grid metrics to better line up glyphs
2023-12-02 10:34:15 -08:00
Mitchell Hashimoto
7f40881747 font: faces use primary grid metrics to better line up glyphs
Fixes #895

Every loaded font face calculates metrics for itself. One of the
important metrics is the baseline to "sit" the glyph on top of. Prior to
this commit, each rasterized glyph would sit on its own calculated
baseline. However, this leads to off-center rendering when the font
being rasterized isn't the font that defines the terminal grid.

This commit passes in the font metrics for the font defining the
terminal grid to all font rasterization requests. This can then be used
by non-primary fonts to sit the glyph according to the primary grid.
2023-12-02 09:51:15 -08:00
Mitchell Hashimoto
399dec6efa Merge pull request #981 from mitchellh/min-contrast
Minimum Contrast Configuration
2023-12-02 07:03:28 -08:00
Mitchell Hashimoto
62d69e95a5 config: improve docs for minimum-contrast 2023-12-01 22:09:52 -08:00
Mitchell Hashimoto
ec8f3d036e renderer/opengl: implement min contrast 2023-12-01 21:55:51 -08:00
Mitchell Hashimoto
e3eba92c0e renderer/metal: only apply min contrast if set and only on non-color fg 2023-12-01 21:26:33 -08:00
Mitchell Hashimoto
7af4009f27 renderer/metal: minimum contrast ratio is configurable 2023-12-01 21:24:38 -08:00
Mitchell Hashimoto
6c859cca82 renderer/metal: minimum contrast experiment
This uses WCAG2 algorithms with a minimum ratio hardcoded of 3:1. This
is not shippable in its current state because we want the ratio to be
configurable and I'm not happy with the way data is being sent to the
shader.
2023-12-01 20:51:16 -08:00
Mitchell Hashimoto
0d82b120da termio: set configured default cursor style on startup
Fixes #958
2023-12-01 19:39:16 -08:00
Mitchell Hashimoto
516edf1506 termio: only change mouse shape if it is changing
Fixes #976
2023-12-01 19:35:18 -08:00
Mitchell Hashimoto
a8c8dcdd98 Merge pull request #980 from mitchellh/macos-open
macos: do not open an initial window if opening from URL
2023-12-01 19:28:44 -08:00
Mitchell Hashimoto
6fed7cde19 macos: do not open an initial window if opening from URL 2023-12-01 19:28:06 -08:00
Mitchell Hashimoto
2b0e58d215 Merge pull request #978 from vancluever/vancluever-nix-zig-update
nix: update flake.lock for nixpkgs-zig-0-12
2023-12-01 14:01:24 -08:00