Commit graph

1854 commits

Author SHA1 Message Date
Kovid Goyal
bdd1e84346
Allow docking windows to the OS window with launch --type=os-window-dock
An OS window dock is shown in every tab of its OS window, below the tab
bar and outside the docks of the tab, and lives as long as the OS window.
It is a single window running a single program, which is kept in the
active tab: it is moved to the new active tab on every tab switch, by a
new C function that moves the window between tabs of an OS window
without recreating its GPU resources. Every tab reserves the space for
the OS window docks, so switching tabs does not resize any windows.

The docks are not closed with tabs and do not keep a tab open, stay in
their OS window when the tab containing them is moved to another OS
window, and are closed when the last other window in the OS window is
closed. They are listed as part of the active tab, and the dock entry of
every docked group in the output of kitten @ ls now has a scope of
window, tab or os-window. They are saved in sessions, once per OS window.

Fixes #10854
2026-11-12 12:47:48 +05:30
Kovid Goyal
65da47b611
More detail for on_quit events and a new on_cwd change event 2026-11-12 11:29:08 +05:30
Kovid Goyal
cb66ed55ca
Fix watcher calls being silently dropped during bursts of window changes
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Every on_resize and on_focus_change took its own 0s timer, so creating many
windows from a single callback filled the fixed size glfw timer table and
add_timer() returned 0, silently dropping the watcher calls. Now watcher
calls are queued and delivered in order behind a single pending timer, and
only when the window actually has a watcher for the event. Calls made during
delivery go to the next batch, preserving the recursion guard the timer
exists for.

Also fix add_timer() leaking a reference to the callback when the timer
could not be added.

Fixes #10853
2026-11-12 09:03:33 +05:30
Kovid Goyal
b261b08b7a
Keep the session of tabs and windows moved to another tab or OS window
A tab moved to another OS Window keeps its session, and new tabs and OS
Windows created for moved tabs and windows belong to the session of what
was moved. A window keeps its own session, which may be none, wherever it
is moved, so --add-to-session=! is respected; a window of no session
belongs to the session of the tab it is in.

Add Window.effective_session_name for the "window session, else its tab's
session" rule that was duplicated in five places, and use it in launch as
well, so --add-to-session=. and --cwd=current agree with
new_window_with_cwd. OS Windows created by launch --type=os-window or for
moved tabs and windows now also record their session.

Closes #10851
2026-11-12 08:51:54 +05:30
Kovid Goyal
a0ac36784f
Cleanup previous PR 2026-11-12 08:49:43 +05:30
Zhizhen He
c5e6bdf1fe
Preserve session files when save_as_session --match has no windows to save
Report an error before writing if a filtered session serializes to
nothing. This keeps an existing session file intact and avoids
creating an empty one at a new path.
2026-11-12 09:33:49 +08:00
Kovid Goyal
14f82c6fcb
Test that scroll_to_prompt with an offset records the target prompt
With a scroll offset the top of the viewport is in the output of the
command above the target. Check that last_visited_cmd_output and
scroll_to_prompt 0 use the prompt that was jumped to, for every offset
and when jumping forward.
2026-11-11 20:18:59 +05:30
Zhizhen He
96ddbed7f6 Clamp scroll_to_prompt offsets to available scrollback
Keep the viewport within the history buffer and remember the matched prompt when it is visible so last-visited output follows the jump.
2026-11-11 21:18:20 +08:00
Kovid Goyal
bb237bf137
fix failing test
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-11 14:15:05 +05:30
Kovid Goyal
7e16359486
Keep everything drawn over the frozen frame aligned during synchronized output
While rendering is paused, output can change the live scroll position,
pixel scroll offset, scrollback size and active screen. Image layers,
cursor visibility and the scrollbar used those live values while the
text was drawn from the frozen snapshot, so they drifted from it.

Capture the scrollback size and active screen at pause time and add
rendered_scrolled_by, rendered_history_count and rendered_on_main_screen
macros alongside rendered_pixel_scroll_offset_y. Move image layer
updates and scrollbar visibility and geometry into screen.c so the
renderer and the tests share the same code.

Closes #10847
2026-11-11 13:29:24 +05:30
Kovid Goyal
da2a59b658
Strengthen the erase_last_command scrollback tests
Test that multicell chars not cut by the erase survive it: a wide char at
the top of the screen and a scaled char in the live prompt running from the
scrollback onto the screen. Check the full text after cutting large chars,
make the fragment check verify the parts above and below each multicell
cell, and run the standalone checks in subtests so that one failure no
longer hides the checks after it.
2026-11-11 11:31:45 +05:30
Kovid Goyal
a9147bbf01
Fix erase_last_command when the live prompt has scrolled into the scrollback
When the first lines of the live prompt were in the scrollback, an unsigned
wrap made erase_last_command delete most of the screen and the newest
scrollback lines, including the live prompt. Delete the erased lines from
the middle of the scrollback instead, with a new historybuf_delete_lines()
that removes multicell chars cut by the deletion, and also remove such
fragments from the screen. Clear selections and the wrap flag of the line
above the erased lines on every path.

Also keep the last visited prompt on the same content when lines are
inserted or deleted (CSI L/M), forget it on a hard reset, and only fill from
the scrollback when unscrolling (CSI + T) if the scroll region starts at the
top of the screen, instead of overwriting the top line of the screen.
2026-11-11 11:22:56 +05:30
Kovid Goyal
e52586d87c
Track the last visited prompt as a single content row
Store the last visited prompt as one row relative to the top of the live
screen (negative rows are in the scrollback) plus the viewport row it was
visited at, and derive the scroll offset when it is used. Previously it was
stored as a (viewport y, scrolled_by) pair that every code path moving lines
had to keep consistent by hand, which broke after erasing a command left
less scrollback than the saved offset, and when scrolling regions with
margins or reverse indexing.
2026-11-11 11:08:48 +05:30
Kovid Goyal
246df5abf1
save_as_session: Cleanup previous PR
Choose the tab to focus using only the windows that were actually saved,
moving the choice into a pure function so it can be tested without
constructing a TabManager. Test the first OS window logic with simple fake
tab managers instead of patching TabManager internals. Merge the changelog
entries and mention restore after logout.
2026-11-11 08:41:17 +05:30
Chance Zibolski
6234c5f99c Fix the focus_tab written by save_as_session --match
TabManager.serialize_state_as_session wrote focus_tab as the index of the
active tab among all the tabs of the OS window, but loading a session
counts only the tabs it creates. With --match the tabs of other sessions
are not saved, so a session with such tabs before its active tab came back
on the wrong tab, or on its last tab once the index was clamped.

Write the index among the saved tabs. When the active tab is not saved, as
when it belongs to another session, write the saved tab with the most
recently focused saved window. That is the tab kitty focuses when switching
to the session while it is open, as window_for_session_name picks the
session's most recently focused window, so the session comes back as it was
last seen. Leaving focus_tab out instead would focus whichever saved tab
has the last focus command, usually the last one, which is arbitrary.
2026-11-10 16:02:17 -08:00
Chance Zibolski
32c6dbd501 Do not open save_as_session --match sessions in a new OS window
Boss.serialize_state_as_session passed is_first to the first OS window it
serialized, which is any but the focused one when there are several. With
--match that OS window can have no matching windows and write nothing, and
the next one then started the file with new_os_window, so loading the
session opened it in a new OS window instead of the current one. Whether
it did depended on which OS window had focus when saving.

Pass is_first to the first OS window that writes anything.
2026-11-10 16:00:46 -08:00
Kovid Goyal
501c57deb5
Make scrollback anchoring more robust
Fix various code paths that dont deal with scrolled back state
correctly.

Closes #10841
2026-11-10 19:20:17 +05:30
Kovid Goyal
bc1628d849
get-colors: Report cursor text color as cursor_text_color
ColorProfile.as_dict() used the key cursor_text instead of the kitty.conf
name cursor_text_color, so get-colors listed the window override under a
different name than the configured value, which then shadowed it.
2026-11-10 08:27:50 +05:30
Kovid Goyal
45cd5201e9
ssh kitten: Fix remote directories being created world writable
The bootstrap script extracted the tarball with umask 000, so tar
created any directories not present in the tarball, such as ~/.terminfo
and the ssh kitten data directory, with mode 0777. Since tar is run with
-p, the permissions of entries in the tarball are already restored
exactly, so the umask override is unnecessary. Remove it so that
directories not in the tarball respect the user's umask, matching the
behavior of bootstrap.py.

Fixes #10834
Closes #10835
2026-11-10 08:15:26 +05:30
Kovid Goyal
62ed852f97
Cleanup patch_global_colors special color decoding
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Check for conversion errors per option so a failed conversion returns
immediately instead of storing the error sentinel and continuing. Document
why macos_titlebar_color stays signed. Make the test meaningful on 64-bit
platforms by asserting negative values are rejected for the unsigned
options, and restore options afterwards.
2026-11-09 19:03:53 +05:30
Zhizhen He
153a8c6295 Fix special color decoding on 32-bit platforms
RGB encodings can use the high bit of a 32-bit long. Decode the Wayland titlebar and scrollbar colors as unsigned values at runtime, matching their config converters. Keep the signed macOS titlebar sentinels.
2026-11-09 21:16:34 +08:00
Egor Ignatov
51b159f990 Fix PNG dimension validation test on 32-bit platforms
Expect OverflowError for dimensions that exceed sys.maxsize, since
PyArg_ParseTuple rejects them before the PNG buffer validation runs.
Continue to expect ValueError for invalid dimensions and buffer lengths
that reach the validation code.
2026-11-09 13:01:06 +03:00
Egor Ignatov
5561bc2900 Fix NULL_COLOR_VALUE on 32-bit platforms
Export NULL_COLOR_VALUE using PyLong_FromUnsignedLong instead of
PyModule_AddIntMacro, which converts it to a signed long. On 32-bit
platforms this turns 0xffffffff into -1 and causes the generated Go
uint32 constant to overflow, preventing kitten from building.

Add a regression check for the exported value.
2026-11-09 13:01:06 +03:00
Kovid Goyal
8f5c7544d1
Bash integration: Source the system startup files bash was built with
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
bash is compiled with the paths to its system wide profile and bashrc
(SYS_PROFILE and SYS_BASHRC) and there is no way to query bash for them.
Previously kitty guessed locations in /etc, which fails on distros that
keep these files elsewhere, such as hermetic /usr distros like Clear Linux
(/usr/share/defaults/etc) or Nix (/etc/bashrc).

Now find the paths by scanning the bash executable for them, both in kitty
and in kitten run-shell (so it works on remote hosts via the ssh kitten).
The result is cached per executable in kitty. If the scan fails, or the
locations are explicitly specified via the environment, the previous
behavior is used.

Fixes #10819
2026-11-07 06:25:36 +05:30
Zhizhen He
d2ec953df7 tests: Reuse existing resource enumeration helper 2026-11-06 19:17:39 +08:00
Kovid Goyal
bdbf9f5af5
Fix #10810
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-05 20:46:52 +05:30
Kovid Goyal
bc9d0b87e3
Custom shaders: Add command and alternate screen events and uniforms
Add the command-start, command-finish, alternate-screen-enter and
alternate-screen-exit events, which fire for changes in the active window,
and the active_window_command_running, active_window_alternate_screen,
active_window_command_state_age and active_window_alternate_screen_age
fields to KittyCustomShaderData, so shaders can show effects while
commands run and hide them in full screen programs.
2026-11-05 08:43:37 +05:30
Kovid Goyal
7670f895a6
IME: Show the cursor at the position reported by the input method in the pre-edit text
Previously the cursor was always drawn after the pre-edit text, as the
cursor position sent by the input method was ignored, so one could not see
which character was being edited when moving inside the pre-edit text, as
with Chewing. Pass the pre-edit cursor from IBus, Wayland text-input and
macOS to kitty, in code points, and place the cursor there. On Wayland, do
not drop pre-edit updates that only move the cursor.

Also use the pre-edit cells rather than the original line under them to
size and color the cursor, so that it covers wide pre-edit characters.

The IME candidate window remains anchored at the start of the pre-edit text.

Fixes #10807
2026-11-05 08:26:34 +05:30
Kovid Goyal
91fb38aee6
retry test thats flaky on CI
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-04 10:33:28 +05:30
Kovid Goyal
bb1aca6f27
Further harden remote control password processing
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-11-03 17:36:01 +05:30
Kovid Goyal
5f2a2cbf94
dont run python between fork and exec in the test PTY helper 2026-11-03 17:22:07 +05:30
Kovid Goyal
67d337794f
Remote control: Harden authorization of stream continuations
Requests on a registered stream skip authentication, so restrict that to
genuine continuations of the authorized request that opened the stream:

- A continuation may differ from the opening request only in its data,
  so it can no longer, for example, supply a different cmdline to run.
- Streams are bound to the socket peer or window that opened them, and
  only requests from that origin can continue or cancel them.
- Streams are aborted, discarding any buffered data, when the peer
  disconnects, the window is closed or the request is cancelled, so
  abandoned streams no longer stay authorized.
2026-11-03 17:12:53 +05:30
Zhizhen He
5234808693 Remote control: Do not register streams for async cancellations
Cancellations of async requests are allowed without authentication, and
requests on a registered stream are allowed without authentication too.
handle_cmd() registered the stream before returning for a cancellation, so
an unauthenticated cancellation could register a stream id that a later
request then used to skip authentication. Register the stream only after
cancellations have returned.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 17:52:17 +08:00
Kovid Goyal
731e0856ec
Fix #10794 2026-11-02 20:05:14 +05:30
Kovid Goyal
4c7990c5dc
Tests: Fix wait_till_child_exits failing with ECHILD when child is killed by a signal
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
The child was reaped by the first waitpid() but since WIFEXITED was false the
loop continued and the next waitpid() raised ChildProcessError, hiding the
actual reason for the failure. Now report the signal and screen contents.
2026-11-01 08:50:24 +05:30
Kovid Goyal
fe55cd1963
Cleanup previous PR
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Store per color scheme auto theme state in a typed dataclass instead of
string built attribute names. Track which theme files were seen during
the directory scan rather than checking for existence afterwards, so a
file deleted mid-scan cannot invalidate unscanned themes. Reset
applied_theme when the applied theme file is deleted.

Always re-read theme files on config reload and apply the theme for the
current system color scheme. Previously, once the applied theme was
invalidated, reloads stopped refreshing theme files, so re-creating the
file had no effect until the next system color scheme change. This also
means theme files created after startup are now applied on reload.
2026-10-31 17:15:08 +05:30
Zhizhen He
9c37638c0e Fix cached automatic themes surviving file deletion 2026-10-31 19:34:26 +08:00
Kovid Goyal
7fbe251750
dnd: Accept base64 payloads with trailing padding
libbase64's stream decoder fails every call made after it has seen
padding, even an empty one, so the empty message that terminates a
stream was rejected. Also size the decode buffers for pre-sent and
drag item data correctly, so that very short padded chunks such as
QQ== are not rejected.

Fixes #10777
2026-10-30 18:16:47 +05:30
Kovid Goyal
1647103c57
Cleanup previous PR
- List the existing files that will be overwritten under the names they
  are stored as in the destination, not the dropped names
- Treat symlinks to directories in the destination as directories in
  find_overwrites, matching rename_contents, so the files that will be
  overwritten inside the symlink target are listed
- Replace an existing file or dangling symlink with a dropped directory
  instead of failing the drop after the user confirmed the overwrite
- Fail up front when a dropped file would replace an existing directory
- Also fold Unicode normalization when uniqifying remote drop names
- Probe for filesystem aliasing once before running the alias test
2026-10-29 21:41:44 +05:30
Zhizhen He
924dacc955
dnd: Detect filesystem aliases before overwrite confirmation 2026-10-29 23:55:24 +08:00
Kovid Goyal
b62e21311d
hyperlink_target_position: Add a tooltip value
Displays the URL in a box sized to fit it, just below the hovered cell,
like a web browser tooltip. Split render_a_bar() into rendering the text
and drawing it so the width of the rendered text can be used to position
the box.

Also redraw when the hovered cell within a hyperlink changes, as the
position of the displayed target now depends on it.
2026-10-29 19:24:32 +05:30
Kovid Goyal
94938d53ee
Add a hyperlink_target_position option
Controls where the URL shown by show_hyperlink_targets is displayed:
along the top or bottom edge of the window, or immediately below the
hovered line. In all cases the URL is moved to the opposite side if it
would otherwise obscure the hovered line.

Fixes #10770
2026-10-29 19:18:07 +05:30
Kovid Goyal
98a6b3ccd4
Fix #10768 2026-10-29 17:26:48 +05:30
Kovid Goyal
6655b2d05d
Cleanup previous PR
Preserve the grapheme segmentation state when the drawing line is
re-initialized after the current char has already been segmented, so that
emoji sequences are not split into multiple cells when wrapped or moved
past scaled text.
2026-10-29 14:42:27 +05:30
Hassan Raza
7703844024
Cover scaled-text collisions at scrolling margins and on the alternate screen 2026-10-29 12:28:40 +05:00
Hassan Raza
8e654b4e4d
Cover wide text crossing scaled glyphs and scrolling 2026-10-29 12:28:40 +05:00
Kovid Goyal
bc46f1bafc
Make mark colors respect color layers
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Mark colors are now stored per color layer and for the colors set by the
program, like the other colors, instead of in a single array that every
change overwrote. So set-colors without --configured no longer changes the
configured mark colors, window and session layer mark colors survive
changes to the global colors, resetting a layer, the color stack and full
reset restore the correct mark colors, --copy-colors copies them and
get-colors reports the mark colors of the window.
2026-10-29 08:57:18 +05:30
Kovid Goyal
862c8657be
Cleanup previous PR
Make ColorProfile.test_mark_colors() return MARK_MASK pairs instead of a
hard-coded three, simplify the test by using MARK_MASK and mutable expected
values, and correct the changelog entry: config reload was not affected,
set-colors, launch --color, sessions and automatic theme switching were.
2026-10-29 08:52:08 +05:30
Kovid Goyal
33f55fbb93
Merge branch 'fix/live-text-marker-colour-slots' of https://github.com/vboufleur/kitty 2026-10-29 08:50:11 +05:30
Kovid Goyal
23cd5fd8eb
Have --config=NONE also skip other conf files used by kitty 2026-10-29 08:46:15 +05:30