3745 Commits

Author SHA1 Message Date
Qwerasd
5b509f9295 test(terminal/Screen): clearRows with protected cells 2024-03-29 16:47:53 -04:00
Qwerasd
925c7e86a2 fix(terminal): insert/deleteLines boundary cond.s
Introduced a helper function for correctly handling boundary conditions
in insertLines and deleteLines. Also adds a whole host of tests for said
conditions in deleteLines, tests not duplicated for insertLines because
they both use the same helper function.
2024-03-29 16:29:27 -04:00
Qwerasd
4c9e238c3f fix(termio/exec): avoid overflow in setCursorRow/ColRelative
Using a saturating addition here just to avoid overflow, since setCursorPos handles proper clamping to the screen size so we don't need to duplicate that logic.
2024-03-29 13:15:24 -04:00
Qwerasd
20ab4ec01f fix(terminal): correct wrap logic in insert/deleteLines
Appropriately handles clearing spacer heads if shifted lines include rightmost column, and centralizes clearing of row wrap state for full width scrolling regions.
2024-03-29 13:12:52 -04:00
Qwerasd
e55f2daf90 perf(terminal): clear unprotected cells in spans
Previous behavior of clearing one at a time hit a page integrity assertion after clearing a wide character but not its tail. This fixes that and should also be - in theory - significantly more performant as well by identifying spans of unprotected cells and clearing them in bulk.
2024-03-29 13:08:38 -04:00
Mitchell Hashimoto
00f018f6ff Merge pull request #1626 from tristan957/libadwaita
fix: remove deprecated to-pixdata gresource preprocessor
2024-03-28 20:07:17 -07:00
Tristan Partin
0adbe097ed fix: remove deprecated to-pixdata gresource preprocessor
It was deprecated in gdk-pixbuf 2.32.

Link: https://docs.gtk.org/gio/struct.Resource.html
2024-03-28 21:15:09 -05:00
Mitchell Hashimoto
37f31017dc Merge pull request #1625 from qwerasd205/spa-epa
fix(terminal/stream): add SPA and EPA handlers
2024-03-28 17:21:13 -07:00
Qwerasd
5df5fb4a56 fix(terminal/stream): add SPA and EPA handlers 2024-03-28 20:05:10 -04:00
Mitchell Hashimoto
77c8a5998f apprt/gtk: handle gtk realize error more gracefully
Fixes #1606

This improves our logging when this occurs and prevents a crash.
The program will just run indefinitely with no windows (you can try to
create another but it will probably fail) but the logs are much more
helpful now.
2024-03-28 15:11:45 -07:00
Mitchell Hashimoto
054aeebf17 Merge pull request #1506 from jcollie/gtk-resources
GTK: Add compiled-in GTK resources and use them for icons.
2024-03-28 14:48:40 -07:00
Mitchell Hashimoto
b6f5970264 minor style changes 2024-03-28 14:45:44 -07:00
Mitchell Hashimoto
41cffd116a Merge pull request #1484 from jparise/window-title-font
macos: configurable titlebar fonts
2024-03-28 09:49:19 -07:00
Mitchell Hashimoto
9aadf59ab1 macos,libghostty: font size is a u8 2024-03-27 20:53:03 -07:00
Mitchell Hashimoto
552c97eea4 font/freetype: avoid overflows with u8 font size 2024-03-27 20:45:55 -07:00
Mitchell Hashimoto
461b16ce34 font sizes are limited to u8 (max size = 255 points)
Fixes #1618

Font sizes in configuration were always a u8, but the keybinding and
internal state was a u16 so it allowed for an ever-growing font size. At
a certain point, there is an integer overflow which causes it to wrap
around. This is all silly, 255 should be large enough for anyone[1]

[1]: Ready to be super wrong about this
2024-03-27 20:36:59 -07:00
Mitchell Hashimoto
dce96847a9 terminal: test eraseRowBounded, fix off by ones 2024-03-27 20:23:45 -07:00
Jeffrey C. Ollie
9f0468f950 generate gresource xml and dependencies at comptime rather than hardcoding 2024-03-27 16:47:27 -05:00
Jeffrey C. Ollie
f943a4cf87 GTK: Add compiled-in GTK resources and use them for icons.
Use glib-compile-resources to compile CSS style sheets and icons into
the Ghostty GTK binary. Makes for simpler access to icons and sets
things up for customizing the look of Ghostty with CSS in the future.
The CSS style sheets are blank for now so there will be no visual
changes.
2024-03-27 16:47:26 -05:00
Mitchell Hashimoto
8d4f454e30 terminal: add integrity assertion that cursor pin matches x/y 2024-03-27 13:42:11 -07:00
Igor Anić
137359bcb5 gtk: use symbolic icon for tab close
On my system (xorg Ubuntu 24.04, Adwaita:dark theme) tab close icon was
red while in all other applications was more discrete. With adding
`-symbolic` to the icon name now looks like all other application.
2024-03-27 20:04:17 +01:00
Mitchell Hashimoto
050e6e4daa terminal: when growing rows, need to set rows before grow()
grow() will not prune pages that are needed for the active but that
requires an accurate self.rows. We were setting this too late.
2024-03-27 10:38:31 -07:00
Kevin Hovsäter
e300d4766d Add final newline to CLI output 2024-03-27 15:32:59 +01:00
Mitchell Hashimoto
caf2742b76 Merge pull request #1584 from mitchellh/paged-terminal
Low-memory terminal state implementation
2024-03-26 20:00:20 -07:00
Jon Parise
baf75dfaaf macos: configurable titlebar fonts
Add support for configurable fonts for window and tab titles. This is
only implemented for macOS (and could be macOS-only if other platforms
aren't able to support this using their windowing toolkits). It plays
nicely with regular and titlebar tabs.
2024-03-26 16:56:39 -07:00
Mitchell Hashimoto
a416d4236a remove old terminal implementation 2024-03-26 16:14:25 -07:00
Qwerasd
d17344b855 perf(terminal/page): @memset micro-optimization 2024-03-26 12:07:35 -06:00
Qwerasd
d72eb30a26 fastmem: fix doc comment 2024-03-26 12:07:35 -06:00
Qwerasd
492e147e26 terminal: clean up some code and comments 2024-03-26 12:07:35 -06:00
Qwerasd
2274b8a912 fix(terminal): don't reset x when indexing in scroll region 2024-03-26 12:07:35 -06:00
Qwerasd
aadf795d28 fix(terminal): correctly use slow path for left/right scroll margin 2024-03-26 12:07:35 -06:00
Qwerasd
23d32e248e perf(terminal): fast-paths for scrolling regions 2024-03-26 12:07:35 -06:00
Qwerasd
d74ea89056 fastmem: rotateOnce 2024-03-26 12:07:35 -06:00
Qwerasd
ddd7f3e706 comments 2024-03-26 12:07:35 -06:00
Qwerasd
9df9c999a7 fix(terminal): clear erased rows
Clearing these rows is necessary to avoid memory corruption, but the
calls to `clearCells` in the first loop were redundant, since the rows
in question are included in the second loop as well.
2024-03-26 12:07:35 -06:00
Qwerasd
0a6ef3fda4 wip(terminal): Fast path for scroll regions 2024-03-26 12:07:35 -06:00
Mitchell Hashimoto
8f873dd488 Merge pull request #1593 from jcollie/log-build-info-2
log more information about the build
2024-03-26 09:47:49 -07:00
Mitchell Hashimoto
4e607e8901 only show optimization 2024-03-26 09:47:09 -07:00
Mitchell Hashimoto
1ad973b274 Merge pull request #1609 from gpanders/kitty-alt-reset
terminal: reset alt screen kitty keyboard state on full reset
2024-03-26 06:46:48 -07:00
Gregory Anders
6c0609ddc8 terminal: reset alt screen kitty keyboard state on full reset 2024-03-26 08:33:21 -05:00
Mitchell Hashimoto
b68e1c6a5d Merge pull request #1555 from BvngeeCord/gtk-tabs-location
add 'gtk-tabs-location'
2024-03-25 21:37:50 -07:00
Mitchell Hashimoto
f00242deaf Merge pull request #1594 from aca/aca
apprt/gtk: commit buffer before "preeditchanged" resets
2024-03-25 21:36:44 -07:00
Mitchell Hashimoto
7f1af89abb terminal: turn unreachable into todo 2024-03-25 20:11:21 -07:00
Mitchell Hashimoto
fcc0ea0c7c terminal: explicit error set for page clone 2024-03-25 20:10:03 -07:00
Mitchell Hashimoto
ad5d7b6c5a terminal: insert/deleteLines with L/R region across pages 2024-03-25 20:07:19 -07:00
Mitchell Hashimoto
e337ebe131 terminal: add clonePartialRowFrom 2024-03-25 20:01:28 -07:00
Gregory Anders
c634ba363a input: fix associated text on macOS
Ghostty does not report associated text on macOS when
macos-option-as-alt is enabled for _any_ key press, whether or not the
Alt modifier is actually present. The "option as alt" decision should
only be made when the alt modifier is present.
2024-03-25 13:43:32 -05:00
Mitchell Hashimoto
fe43462eb3 terminal: address todo to re-resolve 905 2024-03-25 11:20:28 -07:00
Mitchell Hashimoto
41720b3c8d terminal: PageList support initialization of multi-page viewports 2024-03-25 11:06:21 -07:00
Mitchell Hashimoto
705bd21055 terminal: PageList trim blanks erases empty pages
Fixes #1605
2024-03-25 10:18:31 -07:00