Commit Graph

181 Commits

Author SHA1 Message Date
Kovid Goyal
3944a41c00 Add support for xterms report OS window size escape code 2025-11-24 11:12:27 +05:30
Kovid Goyal
1faf786bd2 Remove parse error forsystemd's useless OSC 3008 context protocol
It's spamming the test logs. Just ignore it silently
2025-11-11 09:42:42 +05:30
Kovid Goyal
ab6fec104a Add support for the paste events protocol
Fixes #9183
2025-11-04 15:02:19 +05:30
Kovid Goyal
470068d92f Handle two parameter form of modifyOtherKeys 2025-09-29 14:14:38 +05:30
Aleksey Smolenchuk
65a4d89282 Interactive scrollbar implementation 2025-09-08 11:33:15 -07:00
Kovid Goyal
c18018cbad Use DynamicColor to store extra cursor colors 2025-08-26 18:56:31 +05:30
Kovid Goyal
da641982e2 Start work on specifying a color for extra cursors 2025-08-26 18:56:31 +05:30
Kovid Goyal
14741b1b29 Implement rendering of blinking text
Fixes #8551
2025-08-25 13:55:23 +05:30
Kovid Goyal
c393c1679e Implement rendering of multi cursors in the shaders 2025-08-24 20:14:15 +05:30
Kovid Goyal
8f5dc42a61 Parser for multi cursor escape code 2025-08-24 20:14:14 +05:30
Kovid Goyal
e6c1597834 Start work on multiple hardware cursors 2025-08-24 20:14:14 +05:30
Kovid Goyal
a0b58ef205 Dont allow CUB to move cursor onto previous line
Reserve this behavior for actual backspace. Fixes #8900
2025-08-14 21:49:36 +05:30
Kovid Goyal
d52f2e7981 Rewrite rendering pipeline
This was needed to fix various corner cases when doing blending of colors
in linear space. The new architecture has the same performance as the
old in the common case of opaque rendering with no UI layers or images.

In the case of only positive z-index images there is a performance
decrease as the OS Window is now rendered to a offscreen texture and
then blitted to screen. However, in the future when we move to Vulkan or
I can figure out how to get Wayland to accept buffers with colors in
linear space, this performance penalty can be removed. The performance
penalty was not significant on my system but this is highly GPU
dependent. Modern GPUs are supposedly optimised for rendering to
offscreen buffers, so we will see. The awrit project might be a good
test case.

Now either we have 1-shot rendering for the case of opaque with only ext
or all the various pieces are rendered in successive draw calls into an
offscreen buffer that is blitted to the output buffer after all drawing
is done.

Fixes #8869
2025-08-11 00:47:02 +05:30
Kovid Goyal
45b2678db1 Allow backspace to wrap cursor to previous line
Fixes #8841
2025-07-23 08:56:54 +05:30
Kovid Goyal
540e030f96 Start work on handling multicell escape code 2025-02-03 10:56:43 +05:30
Kovid Goyal
643e534053 Do not call monotonic() when changing cursor position
monotonic() is extremely slow. This call was halving the CSI parsing
speed benchmark. Instead we use the time at which parsing of the current
input chunk was started. This should be within a few microseconds and
accurate enough for the cursor trail for which it is used.
2025-01-17 21:41:02 +05:30
Kovid Goyal
0ecbc2b786 Only log an error about modifyOtherKeys if the application attempts to turn it on without first turning on the kitty keyboard protocol 2025-01-16 20:30:09 +05:30
Kovid Goyal
dd9d8353df Support notifying applications on color scheme change 2024-12-20 09:55:49 +05:30
Kovid Goyal
cabd6c0589 Initial port of code to use TextCache 2024-11-04 09:10:07 +05:30
Kovid Goyal
5a2440eb97 Make the TextCache object available in the Screen, LineBuf and Line objects 2024-11-04 09:10:07 +05:30
Kovid Goyal
05120061cc Move various data types into their own headers 2024-11-04 09:10:07 +05:30
Rick Choi
fe63c6ddfd last rendered cursor_bg color and re-use it when trail rendering 2024-10-19 18:16:26 +09:00
Jesse Weaver
b8f28d7a10 Add special flag to shell integration protocol to request real click events 2024-09-06 00:08:55 -06:00
Kovid Goyal
deff40df8a New OSC 21 protocol for color control
Needs to be specced up
2024-07-22 10:57:13 +05:30
Kovid Goyal
06b5eff6e6 Add support for in-band window resize notifications
Fixes #7642
2024-07-18 20:32:33 +05:30
Kovid Goyal
f4fe015261 Support a special key mode for moving cursor at marked prompts
Needed for fish integration because the arrow keys cause auto-complete
to trigger.
2024-03-31 11:19:35 +05:30
Kovid Goyal
4caf8a6b14 Restore support for alternate character sets
Needed by the execrable ncurses. Adds an extra branch in the hot path,
sigh. Thanks to branch prediction it doesnt have any measurable impact
on the benchmark, thankfully.
2024-02-25 09:57:44 +05:30
Kovid Goyal
f45cd87488 Implement paused rendering for graphics 2024-02-25 09:57:33 +05:30
Kovid Goyal
e50447c840 Fix cursor rendering during rendering pause 2024-02-25 09:57:33 +05:30
Kovid Goyal
f596351bc1 Pause selection rendering 2024-02-25 09:57:33 +05:30
Kovid Goyal
b444b2ee36 Implement paused rendering for cell data 2024-02-25 09:57:32 +05:30
Kovid Goyal
aeb60edf55 Freeze inverted status during paused rendering 2024-02-25 09:57:32 +05:30
Kovid Goyal
182b0aac98 Freeze the color profile during paused rendering 2024-02-25 09:57:32 +05:30
Kovid Goyal
1f835b27c4 start work on implementing pending mode as paused rendering 2024-02-25 09:57:32 +05:30
Kovid Goyal
be37a283d5 Move unfocused ender bool into cursor render info 2024-02-25 09:57:32 +05:30
Kovid Goyal
718f4b328f Go back to a single code path for drawing text
Slightly reduces pure ASCII performance and improves Unicode
performance. We should be able to get pure ASCII performance back
via SIMD eventually.
2024-02-25 09:57:30 +05:30
Kovid Goyal
2dffad1d8e Use byteloader for printable char ranges 2024-02-25 09:57:29 +05:30
Kovid Goyal
307acb3f64 Add API to Screen to draw a set of printable ascii chars fast 2024-02-25 09:57:28 +05:30
Kovid Goyal
e5675e9537 Simplify API 2024-02-25 09:57:28 +05:30
Kovid Goyal
50935b6c93 Cleanup kitty dcs parsing 2024-02-25 09:57:24 +05:30
Kovid Goyal
6205fb32fd Refactor VT parser for more speed
No longer copy bytes into a separate buffer, instead parse them in place
in the read buffer
2024-02-25 09:57:23 +05:30
Kovid Goyal
065866895c Get pending mode working and add a few more tests 2024-02-25 09:57:23 +05:30
Kovid Goyal
52025ff030 misc parser and test fixes 2024-02-25 09:57:22 +05:30
Kovid Goyal
5f809bf249 Get kitty building with the new VT parser 2024-02-25 09:57:22 +05:30
Kovid Goyal
b083ad9038 Start work on bytes based VT parser 2024-02-25 09:57:22 +05:30
Kovid Goyal
b4f88b4f81 A new option to control when hyperlinks are underlined
While kitty is never going to underline detected URLs as the performance
of that is absurd, underlining hyperlinks specifically is acceptable,
since they dont require detection.

See #6766
2023-11-03 08:51:58 +05:30
Kovid Goyal
1693107608 A new escape code to change the shape of the mouse pointer
Fixes #6711
2023-10-15 19:57:36 +05:30
Eric Myhre
d310acc780 Add word-and-line-from-point feature to possible mouse selection actions. 2023-10-05 17:47:53 +02:00
pagedown
823db08712 IME: Right align overlay when typing at the edge of the screen
When the cursor is at the right edge of the screen, push the overlay to
the left to display the pre-edit text just entered.
2023-03-04 16:11:29 +08:00
pagedown
126aaddccb IME: Render overlay at the last visible cursor position with a separate cursor
Fix the problem caused by wrong cursor coordinates. No more messing with
the main cursor, instead the cursor is saved when receiving a pre-edit
text update and used for drawing later.

Update the overlay to the last visible cursor position before rendering
to ensure it always moves with the cursor. Finally, draw the overlay
after line rendering is complete, and restore the line buffer after
updating the rendered data to ensure that the line text being read is
correct at all times.

This also improves performance by only rendering once when changes are
made, eliminating the need to repeatedly disable and draw after various
commands and not even comprehensively.
2023-02-22 22:36:06 +08:00