Commit Graph

16363 Commits

Author SHA1 Message Date
Alexis (Poliorcetics) Bourget
4cccf929eb fix: when parsing python_strings options, don't fail if ' is last
Previously, if the last character was `'` parsing would fail: from `abc'`
it would produce the literal `'''abc''''`, which has one too many
unescaped single quote at the end.

This also fixes the issue for solo `'''`, where before it would produce
`''''\\'''''`, again with one too many single quote at the end.

I added tests for both cases.
2025-09-06 20:33:15 +02:00
Kovid Goyal
d837a64e36 Workaround for latest Apple regression in Tahoe
Now NSWindow::close no longer actually closes the window. Sigh. Have to
also set its frame to zero size, otherwise an invisible rect remains
that intercepts mouse events and takes up space in Mission Control.

Life is too short for this shit. Fixes #8952
2025-09-05 17:27:46 +05:30
Kovid Goyal
b7c4f42e96 Move preservation of OpenGL context into glfw
Allows us to avoid creating an extra hidden window.
2025-09-05 15:29:06 +05:30
Kovid Goyal
b241811a74 Make the Apple context preserving window 1x1 2025-09-05 14:42:01 +05:30
Kovid Goyal
ce4c511fdc Use a 16bit per channel texture for intermediate output rather than 8bit per channel
This doubles VRAM consumption, but is needed for accurate color
blending of the intermediate layers. 16bits is mostly enough, though for
perfect accuracy 32 bits is required. Use 16 as a compromise.

Fixes #8953
2025-09-05 08:47:53 +05:30
Kovid Goyal
142307d4cd Add some footnotes explaining what features native cursors have 2025-09-04 22:02:04 +05:30
Kovid Goyal
574386f45b Fix rendering of underlines when using larger text sizes with the space and en-space characters
Fixes #8950
2025-09-04 20:44:35 +05:30
Kovid Goyal
315562d73d Cleanup previous PR 2025-09-03 21:46:47 +05:30
Kovid Goyal
2ca7b505f4 Merge branch 'master' of https://github.com/rockorager/kitty 2025-09-03 21:34:21 +05:30
Tim Culverhouse
0760733bd1 options: add copy_or_noop, make default
Add a "copy_or_noop" option which copies the text, and if there is no
selected text passes through the key. This allows applications to
implement native text selection but also have cmd+c still function as a
copy key since they can now receive it.

Make this the default on macos. This should have very little impact on
users because when no text is selected, the application can
(potentially) handle the key.
2025-09-03 11:01:57 -05:00
Kovid Goyal
ecf7f0cab0 kitten diff: Fix incorrect rendering if diff completes before terminal responds to capabilities query 2025-09-02 11:29:55 +05:30
Kovid Goyal
e1d8565fb6 Add os_window_title to sessions 2025-09-01 19:30:50 +05:30
Kovid Goyal
ab4e86dfec Avoid a copy when custom function is not used 2025-08-30 09:03:34 +05:30
Kovid Goyal
1544830307 Allow using a custom python function in tab_title_template
Makes it easier to do complex processing
2025-08-30 09:02:39 +05:30
Kovid Goyal
7ff25fd77c Add an extra linenum-action so that the callback can use remote control without needing to turn it on globally 2025-08-29 17:13:56 +05:30
Kovid Goyal
71fd568357 Merge branch 'fix-show-key-typo' of https://github.com/TomJGooding/kitty 2025-08-28 08:14:48 +05:30
TomJGooding
bec29467c1 fix(show_key): fix typo in python exit message 2025-08-27 21:07:21 +01:00
Kovid Goyal
720319ec8c Document the _with_cwd actions as adding to active session 2025-08-27 06:03:08 +05:30
Kovid Goyal
b4d9af9932 Document extra cursor color control 2025-08-26 22:02:02 +05:30
Kovid Goyal
44b5d8f656 Dont use negative numbers in multi cursor protocol
There are apparently many parsers out there that cant handle them.
2025-08-26 21:43:37 +05:30
Kovid Goyal
e76f4c630f Implement displaying of extra cursor color 2025-08-26 21:27:13 +05:30
Kovid Goyal
6c44eadf77 Directly operate on vec3 for linear2srgb 2025-08-26 19:14:06 +05:30
Kovid Goyal
0307ae061e step one to calculating extra cursor colors 2025-08-26 18:56:31 +05:30
Kovid Goyal
6d9dcc3171 Pass extra cursor colors to shader 2025-08-26 18:56:31 +05:30
Kovid Goyal
b38be3005c Add dynamic color enum defines to shader 2025-08-26 18:56:31 +05:30
Kovid Goyal
c18018cbad Use DynamicColor to store extra cursor colors 2025-08-26 18:56:31 +05:30
Kovid Goyal
5bb842c34c DRYer 2025-08-26 18:56:31 +05:30
Kovid Goyal
77d9647e03 More descriptive name 2025-08-26 18:56:31 +05:30
Kovid Goyal
f8dac2c136 Write foreground output only at end of shader 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
3239cec409 Merge branch 'pr8930-detached-log-line-buffered' of https://github.com/druckdev/kitty 2025-08-26 18:56:16 +05:30
Julian Prein
3e26d90648 Make detached-log line buffered
After redirecting stdout and stderr to the log file, they become block
buffered. This results in a (temporarily) incomplete log and becomes
particularly annoying when kitty crashes/hangs and has to be killed, as
the error messages are not flushed then and thus lost.
2025-08-26 15:08:52 +02:00
Kovid Goyal
518e06cfa4 Also report -2 in query response 2025-08-25 15:30:36 +05:30
Kovid Goyal
14741b1b29 Implement rendering of blinking text
Fixes #8551
2025-08-25 13:55:23 +05:30
Kovid Goyal
24049a1a5a Implement round tripping of SGR blink (5/25) 2025-08-25 12:34:38 +05:30
Kovid Goyal
5a3e9a5567 Add a warning about the multi cursor spec being under discussion 2025-08-25 11:36:12 +05:30
Kovid Goyal
67763029fc Store SGR attributes in a sub struct of Cursor
Makes various operations like clearing text attributes, copying text
attributes etc. faster and less code.
2025-08-25 11:12:35 +05:30
Kovid Goyal
7c14524d35 fix spelling 2025-08-25 11:04:36 +05:30
Kovid Goyal
d74fd5c94a Validate rect co-ords 2025-08-25 10:29:37 +05:30
Kovid Goyal
574e5ab1d5 Make CodeQL happy 2025-08-25 10:26:41 +05:30
Kovid Goyal
547d09a747 ... 2025-08-24 21:34:11 +05:30
Kovid Goyal
0772a01779 More docs for extra cursors 2025-08-24 21:11:25 +05:30
Kovid Goyal
bacd13d3a7 extra cursors: Add some tests for invalid input handling 2025-08-24 20:25:38 +05:30
Kovid Goyal
1c9a2dae86 Start work on documenting the multi cursor protocol 2025-08-24 20:14:15 +05:30
Kovid Goyal
c393c1679e Implement rendering of multi cursors in the shaders 2025-08-24 20:14:15 +05:30
Kovid Goyal
b2f543f9bd Refactor cell shader to take cursor shape as input
Less code for one const array lookup per vertex. And will
allow implementation of multiple cursors more easily.
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
d8cfb6b180 Remove tabs_to_be_shown_in_tab_bar_as_sequence
It was a dangerous API as it kinda implied the returned tabs were a copy
but they werent when no filter was present. Take the small perf hit of
always making a copy for safety.
2025-08-24 20:12:28 +05:30
Kovid Goyal
543e113be0 ... 2025-08-24 20:07:01 +05:30