4145 Commits

Author SHA1 Message Date
RGBCube
0e941896fa Compile wraptest with O3, run hooks 2023-12-08 16:53:02 +03:00
RGBCube
5846d991e9 Add garnix cache and clean up all nix code 2023-12-08 16:52:58 +03:00
Mitchell Hashimoto
54e7f13f14 remove new-window action from desktop file
Fixes #1006
2023-12-08 16:38:20 +03:00
Chris Marchesi
df142e08ad Selection: fix bottom-right/top-left rectangle selections
This fixes an issue where selections from the bottom-right to the
top-left (or top-left to bottom-right), in addition to some single-line
rectangle selections, were not working.

This works by handling situations where only one of the x or y
axes in the start or end points may need to be flipped to get the
correct top-left or bottom-right of a selection. We call these kinds of
orientations "mirrored", like you were looking in a mirror.

This also adds a small bit of logic that keeps these kinds of motions in
rectangle selection from selecting the character before or after it.
This has the current side-effect of anchoring a rectangle selection to
the original characters if you change directions during the selection,
something I will look at in a later commit.

Finally, this also removes rectangle select on double-click. I thought
this might be a good idea, but word select in rectangle mode really
does not work (the effect seems pretty erratic), and it's not
implemented in Kitty either.

Fixes #1008.
2023-12-07 23:51:37 -08:00
Matt Robenolt
d9725f645a meta: add make clean task 2023-12-07 23:07:51 -08:00
Mitchell Hashimoto
4b25356625 macos: manually show window to handle mission control behavior
Fixes #1018
Fixes #1020

This disables the "visibleAtLaunch" configuration in the xib and
manually shows the window when it loads. This lets us carefully control
what happens particularly when a window is full screen (native) and part
of Mission Control.

Previously, the behavior depended on the Settings.app "Prefer tabs
when opening documents" setting, but we didn't handle every behavior
correctly (see #1018 and #1020). I couldn't find a way to robustly
handle all cases because there are no published macOS APIs for
interacting with Mission Control...

Plus, terminals aren't really "documents" so it did confuse at least one
user that Ghostty would follow this configuration. We just incidently
did because we use native tabbing.

This PR takes full control into our own hands. Our behavior is now:

  - If a new window is created from a native fullscreen window, the
    new window is created into native fullscreen.

  - If a new tab is created from a native fullscreen window, the
    tab is added to the existing window and does not create a new space.

  - If a window or tab is created from a non-fullscreen window, the
    existing behaviors remain.
2023-12-07 22:44:47 -08:00
Chris Marchesi
d34b5571d8 Powerline: Add half-circle rendering
This adds in-terminal rendering for the powerline glyphs E0B4 and E0B6,
similar to how we are rendering the triangle shapes currently.

The circle glyphs use a much more complex rendering due to the nuances
of drawing them: we use a midpoint algorithm for drawing on a 4x
supersampled matrix, fill, and then downsample. We use the same
downsampling approach as is done in the arc box drawing code.

The midpoint variant we're using here is described by Dennis Yurichev:
https://yurichev.com/news/20220322_circle/, although there are similar
variants elsewhere (some cited at the bottom of his article).
2023-12-07 22:29:59 -08:00
Wataru Nishimoto
5979bcb74a use images/icons for mac app icons 2023-12-08 14:56:51 +09:00
Mitchell Hashimoto
9b81d57cb9 remove new-window action from desktop file
Fixes #1006
2023-12-07 20:46:05 -08:00
Mitchell Hashimoto
fcbd3ac4de Merge pull request #1019 from mitchellh/underline-palette
terminal: support `58;5` for setting underline color via 256 palette
2023-12-07 15:04:26 -08:00
Mitchell Hashimoto
84a0e4e62d terminal: support 58;5 for setting underline color via 256 palette
Fixes #1013
2023-12-07 14:57:07 -08:00
Mitchell Hashimoto
3f76094d84 macos: handle the "+" button automatically adding the window to the tabs
Fixes #1010
2023-12-07 14:39:54 -08:00
Mitchell Hashimoto
6c285e1a3d Merge pull request #1015 from mitchellh/macos-tab-order
macos: new tab button creates new tab after short delay
2023-12-07 12:42:15 -08:00
Mitchell Hashimoto
fc6def01a1 macos: new tab button creates new tab after short delay
Fixes #1010

I can't explain this. See the comment in the diff.
2023-12-07 12:35:19 -08:00
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