Commit Graph

13213 Commits

Author SHA1 Message Date
dependabot[bot]
56d4e6d955 build(deps): bump softprops/action-gh-release from 2.4.2 to 2.5.0
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.2 to 2.5.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](5be0e66d93...a06a81a03e)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 03:08:36 +00:00
Jon Parise
5714ed07a1 zsh: improve minimum version check (#9772)
- Handle autoload failures
- Prefer ">&2" to "/dev/stderr" for portability
- Quote commands for consistency and to avoid alias conflicts
2025-12-01 11:15:02 -05:00
Mitchell Hashimoto
09f7e38b45 GTK: followup update search state on activation (#9766)
followup from comment in this PR
https://github.com/ghostty-org/ghostty/pull/9765
2025-12-01 07:25:45 -08:00
Jon Parise
b776b3df61 zsh: improve minimum version check
- Handle autoload failures
- Prefer ">&2" to "/dev/stderr" for portability
- Quote commands for consistency and to avoid alias conflicts
2025-12-01 10:19:00 -05:00
rhodes-b
27c82f739e only update search when going from inactive to active 2025-11-30 21:22:07 -06:00
rhodes-b
3ab49fdb5f only notify search change when widget was inactive 2025-11-30 21:06:25 -06:00
Mitchell Hashimoto
2a9a57daff GTK: update search state from previous search on activation (#9765)
I think it makes sense that if there was already text from the previous
search that it should match based on that, this doesnt remove that it
highlights everything so you can press backspace to delete and start
from a empty search
2025-11-30 12:38:34 -08:00
Mitchell Hashimoto
750bb1fe33 core: encode mouse buttons 8 & 9 (back/forward) (#9761)
For some reason button 8 & 9 support is missing.
2025-11-30 12:37:33 -08:00
rhodes-b
7820608b04 if search has text already update the search state with matches 2025-11-30 14:32:13 -06:00
CJ van den Berg
7be28e7215 core: encode mouse buttons 8 & 9 (back/forward) 2025-11-30 17:53:21 +01:00
Mitchell Hashimoto
34fd1dd0f6 GTK: Search UI (#9756)
Fixes #189 

This adds the UI for search to GTK. There is still polish to be done in
follow-ups but this makes search work well with GTK to start!

**AI disclosure:** Believe it or not, almost this entire PR was
AI-written. Amp did an excellent job looking at our existing codebase,
comparing it to the macOS codebase, writing blueprint files, etc. I
reviewed everything written, modified some basics, and verified it
manually and under Valgrind.

## Demo

<img width="1654" height="1234" alt="CleanShot 2025-11-29 at 20 52
11@2x"
src="https://github.com/user-attachments/assets/0eb38367-398f-4165-9838-7a35465857bc"
/>

## Future Improvements

- When dragging the overlay, we should change the cursor and show drop
targets
- There's probably some small stylistic tweaks we can make to this
- I'm not sure the CSS is right for both light and dark modes so we may
need to tweak that
2025-11-30 07:24:36 -08:00
Mitchell Hashimoto
c67bcf969c apprt/gtk: switch to has-x and optional internals for search counts 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
b8393fd4aa apprt/gtk: comments 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
e18a7d9501 apprt/gtk: drag 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
f7a6822e30 apprt/gtk: enter/shift+enter for traversing search results 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
72b3c14833 clean up some stuff 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
56a76cc174 apprt/gtk: fix selected search label off by one 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
eebce6a78c apprt/gtk: hook up close search button 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
76496d40fd apprt/gtk: hook up next/prev match 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
0ea85fc483 apprt/gtk: hook up search_total/search_selected apprt actions 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
fc9b578ef4 apprt/gtk: hook up search-changed to start a search 2025-11-30 07:23:10 -08:00
Mitchell Hashimoto
0d32e7d814 apprt/gtk: escape to stop search and hide overlay 2025-11-30 07:23:09 -08:00
Mitchell Hashimoto
778b49c9a1 apprt/gtk: hook up start_search/end_search to set active state 2025-11-30 07:23:09 -08:00
Mitchell Hashimoto
027e5d631a config: default search keybindings for Linux 2025-11-30 07:23:09 -08:00
Mitchell Hashimoto
548d1f0300 apprt/gtk: search overlay UI 2025-11-30 07:23:09 -08:00
Mitchell Hashimoto
832883b600 apprt/gtk: move surface event controllers, block events from revealers 2025-11-30 07:23:09 -08:00
Mitchell Hashimoto
4fef41bc83 terminal: renderstate needs to reset highlights on dirty (#9759)
This fixes memory corruption where future matches on a fully dirty row
would write highlights out of bounds. It was easy to reproduce in debug
by searching for `$` in `ghostty +boo`
2025-11-30 07:22:54 -08:00
Tim Culverhouse
a58e33c06b PageList: preserve size.cols in adjustCapacity after column shrink
When columns shrink during resize-without-reflow, page.size.cols is
updated but page.capacity.cols retains the old larger value. When
adjustCapacity later runs (e.g., to expand style/grapheme storage),
it was creating a new page using page.capacity which has the stale
column count, causing size.cols to revert to the old value.

This caused a crash in render.zig where an assertion checks that
page.size.cols matches PageList.cols.

Fix by explicitly copying page.size.cols to the new page after
creation, matching how size.rows is already handled.

Amp-Thread-ID: https://ampcode.com/threads/T-976bc49a-7bfd-40bd-bbbb-38f66fc925ff
Co-authored-by: Amp <amp@ampcode.com>
2025-11-30 07:20:54 -08:00
Mitchell Hashimoto
d7087627d7 terminal: renderstate needs to reset highlights on dirty
This fixes memory corruption where future matches on a fully dirty row
would write highlights out of bounds. It was easy to reproduce in debug
by searching for `$` in `ghostty +boo`
2025-11-30 07:18:42 -08:00
Mitchell Hashimoto
73be3abf00 Update iTerm2 colorschemes (#9755)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20251124-150533-2b326a8
2025-11-29 20:56:10 -08:00
mitchellh
643c5e00a0 deps: Update iTerm2 color schemes 2025-11-30 00:16:02 +00:00
Mitchell Hashimoto
3754a94cb5 Allow list-theme action with --plain to sort with --color argument (#9748)
not an accepted issue
https://github.com/ghostty-org/ghostty/discussions/9745 but it seemed
simple enough to add, pretty much copies how the previewer sorts based
on color

This allows --color argument to work when using --plain to sort the list
returned
2025-11-29 14:02:57 -08:00
Mitchell Hashimoto
7f950cc892 search: handle soft-wrapped lines in sliding window properly (#9753)
Fixes #9752
2025-11-29 10:56:11 -08:00
Mitchell Hashimoto
10f19ebdc3 search: handle soft-wrapped lines in sliding window properly
Fixes #9752
2025-11-29 07:32:06 -08:00
Mitchell Hashimoto
2fd48b433d macos: window-width/height is accurate even with other widgets (#9747)
Fixes #2660

Rather than calculate our window frame size based on various chrome
calculations, we now utilize SwiftUI layouts and view intrinsic content
sizes with `setContentSize` to setup our content size ignoring all our
other widgets.

I'm sure there's some edge cases I'm missing here but this should be a
whole lot more reliable on the whole.
2025-11-29 06:56:18 -08:00
rhodes-b
351dd2ea51 allow list themes --plain to accept --color flag 2025-11-28 19:26:11 -06:00
Mitchell Hashimoto
c75bade896 macos: window-width/height is accurate even with other widgets
Fixes #2660

Rather than calculate our window frame size based on various chrome
calculations, we now utilize SwiftUI layouts and view intrinsic content
sizes with `setContentSize` to setup our content size ignoring all our
other widgets.

I'm sure there's some edge cases I'm missing here but this should be a
whole lot more reliable on the whole.
2025-11-28 13:32:03 -08:00
Mitchell Hashimoto
9baf37a9b2 macOS: fix toggle_visibility behaviour with tabbed windows (#9742)
This fixes regression of #5690, which kind of comes from #9576. 

05b42919d5 (before #9576) has weird
behaviours too: restored windows are not properly focused. With this pr,
we only order `selectedWindow` front so we won't mess up with its
selection and focused state and the order of the tab group.


https://github.com/user-attachments/assets/8c3b120e-4077-4cb5-8ed3-9b46522e2f8e
2025-11-28 06:23:58 -08:00
Lukas
94f88c8b54 macOS: fix toggle_visibility behaviour with tabbed windows
This fixes regression of #5690, which kind of comes from #9576. 05b42919d5 (before #9576) has weird behaviours too, restored windows are not properly focused. With this pr, we only order `selectedWindow` front so we won't mess up with its selection state and the order of the tab group.
2025-11-28 10:14:07 +01:00
Mitchell Hashimoto
199119967b Remove unused imports (#9736)
Done with AI:
https://ampcode.com/threads/T-07890fd7-5d5c-462a-8d50-ba7ac6565796

I'm reviewing it now, but if builds pass we're probably fine.
2025-11-27 13:52:28 -08:00
Mitchell Hashimoto
dbfc3eb679 Remove unused imports 2025-11-27 13:37:53 -08:00
Mitchell Hashimoto
d8aeffe1e9 macos: add hover styles to search buttons, cursor changes (#9734)
https://github.com/user-attachments/assets/72a561b5-f863-48c9-97cb-414ed89a8e3f
2025-11-27 13:22:02 -08:00
Mitchell Hashimoto
5c1679209d macos: add hover styles to search buttons, cursor changes 2025-11-27 13:01:51 -08:00
Mitchell Hashimoto
4ff0e0c9d2 input: remove the unused end search entry in the palette 2025-11-27 07:21:59 -08:00
Mitchell Hashimoto
14899591ce terminal: PageList search should halt when pin becomes garbage (#9722)
This means that the pin we're using to track our position in the
PageList was part of a node that got reused/recycled at some point. We
can't make any meaningful guarantees about the state of the PageList.

This only happens with scrollback pruning so we can treat it as a
complete search.
2025-11-26 16:48:30 -08:00
Mitchell Hashimoto
842becbcaf terminal: PageList search should halt when pin becomes garbage
This means that the pin we're using to track our position in the
PageList was part of a node that got reused/recycled at some point. We
can't make any meaningful guarantees about the state of the PageList.

This only happens with scrollback pruning so we can treat it as a
complete search.
2025-11-26 16:36:44 -08:00
Mitchell Hashimoto
c199a8fe7e terminal: RenderState must consider first row in dirty page dirty (#9719)
Fixes #9718
2025-11-26 13:24:05 -08:00
Mitchell Hashimoto
b96b55ebde terminal: RenderState must consider first row in dirty page dirty 2025-11-26 13:20:16 -08:00
Mitchell Hashimoto
e64ae2e966 macOS: refine Search UI (#9717)
- fix search dragging animation when corner is not changed
- use ConcentricRectangle on Tahoe


https://github.com/user-attachments/assets/64c294a7-70bd-484d-b153-4aa2d734b1a7
2025-11-26 12:36:24 -08:00
Lukas
dc08d057fe macOS: use ConcentricRectangle on Tahoe 2025-11-26 21:00:14 +01:00