Mitchell Hashimoto
ed5c001690
font/shaper: split ligature around cell style change
2023-08-29 14:09:21 -07:00
Mitchell Hashimoto
be27b825f3
terminal: resize with less cols preserves zero width codepoints
2023-08-28 08:18:03 -07:00
Mitchell Hashimoto
c243c9d72e
terminal: screen test dumpString function should add graphemes
2023-08-28 08:07:40 -07:00
Mitchell Hashimoto
e6edf3105e
font: grapheme clusters need to find a single font for all codepoints
...
When font shaping grapheme clusters, we erroneously used the font index
of a font that only matches the first codepoint in the cell. This led to the
combining characters being [usually] unknown and rendering as boxes.
For a grapheme, we must find a font face that has a glyph for _all codepoints_
in the grapheme.
This also fixes an issue where we now properly render the unicode replacement
character if we can't find a font satisfying a codepoint.
2023-08-26 09:35:56 -07:00
Mitchell Hashimoto
33c21c7339
terminal: mark kitty images as dirty on resize
2023-08-22 14:46:23 -07:00
Mitchell Hashimoto
5a9bbcbc2d
renderer/metal: clip image if necessary off top of viewport (scrolling)
2023-08-22 11:32:45 -07:00
Mitchell Hashimoto
80c7f09a36
terminal/kitty-gfx: start terminal state, can load and add images
2023-08-20 22:03:21 -07:00
Mitchell Hashimoto
a9d7e0eb7f
terminal: parse kitty query, push, pop keyboard flags
2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
9e27dcdec9
font: shaper doesn't split run on selection if selection splits grapheme
2023-08-15 15:32:10 -07:00
Mitchell Hashimoto
c8d1745791
terminal: selection string must include grapheme data
2023-08-15 14:55:43 -07:00
Mitchell Hashimoto
67fb8d9bd4
terminal: do not crash if selecting a wide spacer on a soft-wrapped line
2023-08-15 14:38:13 -07:00
Mitchell Hashimoto
6a4b25714a
terminal: add a test to verify our grapheme state is what we expect
2023-08-15 13:55:35 -07:00
Mitchell Hashimoto
63fa34ef6b
terminal: avoid underflow on resize, tests added
2023-08-12 11:30:07 -07:00
Mitchell Hashimoto
71c8d5fc8e
terminal: resizing to 1 col wide with wide chars
2023-08-12 10:23:06 -07:00
Mitchell Hashimoto
44dd51a5b9
terminal: less col resizing with wide char needs to insert head spacer
2023-08-12 10:07:13 -07:00
Mitchell Hashimoto
eb10e9642c
terminal: introduce wide spacer head if reflowing wide char w/ more cols
2023-08-12 09:51:33 -07:00
Mitchell Hashimoto
3d5eda62fe
terminal: resize more cols with wide spacer head across multiple lines
2023-08-12 08:26:13 -07:00
Mitchell Hashimoto
a6af75aee4
terminal: resize more cols with wide spacer head deletes the spacer
2023-08-12 08:20:10 -07:00
Mitchell Hashimoto
3d72178ef4
terminal: delete wide char if it wraps and we delete the row above
2023-08-11 16:23:02 -07:00
Mitchell Hashimoto
8bb69045a8
terminal: allow selections outside of written area and clamp
...
This fixes a possible crash.
2023-08-11 14:21:07 -07:00
Kevin Hovsäter
22b8173164
Fix typos
2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
a890cc3a5b
terminal: add screen.dumpString
2023-07-09 11:52:37 -07:00
Mitchell Hashimoto
de66d4925a
terminal: rename scroll "delta/delta_no_grow" to screen/viewport
2023-07-08 13:47:16 -07:00
Mitchell Hashimoto
1a94f6ba7d
terminal: do not scroll viewport if new lines are added while scrolled
2023-07-08 13:42:00 -07:00
Mitchell Hashimoto
b3b19997ea
terminal: scroll to row always tries to get it to the top
2023-07-06 10:31:47 -07:00
Mitchell Hashimoto
9f86c48fd8
keybinding jump_to_prompt for semantic prompts
2023-07-06 10:30:29 -07:00
Mitchell Hashimoto
b542f7e3c4
terminal: jump to prompt core methods
2023-07-06 10:16:07 -07:00
Mitchell Hashimoto
738c4dff4c
clear_screen keybinding works even when not at shell prompt
...
Instead of sending formfeed (0x0C), clear_screen actually does a
terminal emulator level clear instead. This MOSTLY matches the behavior
of iTerm and Terminal.app, with some differences:
1. I do not clear _below_ the cursor. I feel like the use case for
this feature is primarily to clear above the cursor. Happy to be
wrong here but I want it proven to me!
2. I do not clear in alternate screen mode. Clearing alt screens
breaks rendering in Vim, less, etc. and it feels like the wrong
behavior.
2023-07-05 14:01:01 -07:00
Mitchell Hashimoto
314f9287b1
Update Zig ( #164 )
...
* update zig
* pkg/fontconfig: clean up @as
* pkg/freetype,harfbuzz: clean up @as
* pkg/imgui: clean up @as
* pkg/macos: clean up @as
* pkg/pixman,utf8proc: clean up @as
* clean up @as
* lots more @as cleanup
* undo flatpak changes
* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
56f8e39e5b
Update zig, mach, fmt
2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
c6356930cc
renderer: support invisible attribute
2023-06-25 09:31:33 -07:00
Mitchell Hashimoto
8d40fba9ce
terminal: correct assertion for scrollUp
2023-06-23 14:06:40 -07:00
Mitchell Hashimoto
860209e968
terminal: track underline color on cell
2023-06-20 09:37:58 -07:00
Mitchell Hashimoto
e26cb46f4a
terminal: tests for semantic prompt on resize
2023-05-31 16:20:30 -07:00
Mitchell Hashimoto
414f2e52a5
terminal: semantic prompt aware resize
2023-05-31 16:16:00 -07:00
Mitchell Hashimoto
4047a90555
terminal: track semantic prompt metadata per row
2023-05-27 15:45:51 -07:00
Mitchell Hashimoto
b196e43ee4
fix some issues for future Zig update
2023-05-19 08:34:07 -07:00
Mitchell Hashimoto
97d9157d22
update zig version
2023-05-07 20:50:51 -07:00
Mitchell Hashimoto
5225836415
terminal: selectWord stops at single/double quote boundaries
2023-03-23 10:48:03 -07:00
Mitchell Hashimoto
70236ebc33
terminal: screen scroll with full scrollback modifies selection
2023-03-21 10:59:44 -07:00
Mitchell Hashimoto
dfb40426a0
move selection to screen
2023-03-21 10:43:50 -07:00
Mitchell Hashimoto
54d6654d8b
terminal: selectLine can select last line with scrollback
...
We had incorrect logic around when the line you want to select is the
last line and it crashed. A new test case covers this.
2023-03-17 11:07:43 -07:00
Mitchell Hashimoto
4ececc8923
screen: resize rows should use old cols value
2023-03-02 13:46:58 -08:00
Mitchell Hashimoto
ba96a2c023
screen: adding cols doesn't mess with the viewport
...
This was untested anyways, and the result was bugs!
2023-03-01 22:14:19 -08:00
Mitchell Hashimoto
28378a350d
screen: shrinking cols trims trailing blank lines
2023-03-01 22:01:42 -08:00
Mitchell Hashimoto
05fe2a83b1
terminal: erase display below should unwrap soft wrapped state
2023-03-01 21:30:31 -08:00
Mitchell Hashimoto
56cb1dd55b
screen: correct cursor position with scrollback and less cols
2023-03-01 21:06:33 -08:00
Mitchell Hashimoto
979dc5a439
screen: redo resizing to less columns
...
This is more performant (prefers fast copies if no wrapping) and keeps
track of the cursor more accurately.
2023-03-01 20:59:35 -08:00
Mitchell Hashimoto
3b586c39c5
screen: grow cols before rows to handle reflow (tested)
2023-03-01 19:45:39 -08:00
Mitchell Hashimoto
74f0e38b57
screen: only trim if we're not wrapping on col growing
2023-03-01 17:42:46 -08:00