Commit graph

19343 commits

Author SHA1 Message Date
Kovid Goyal
409fd06cc3
autoformat 2026-09-26 15:51:14 +05:30
Kovid Goyal
d63d7ef643
Drag and drop: Fix issues in tab hover switching and insertion
- Dropping a tab on the tab bar always re-orders. Only windows are merged
  into a tab when dropped on its middle. Single window tabs still switch
  tabs on hover so they can be dropped into the content area.
- Draw the vertical insertion marker in the blank line between tabs so it
  does not hide a tab title, using a single cell only when crowded.
- Make the dropped tab active after a drop from another OS Window, instead
  of whichever tab ended up at the stale active index after re-ordering.
- Dropping the window of a single window tab at an insertion point moves
  its tab, preserving title and layout, and is a no-op next to itself.
- Do not leave an empty tab behind if moving a dropped window fails.
- Highlight the new tab button only when appending.
- Unify the window and tab drag hover state and share the tab bar drop
  hit testing code.
2026-09-26 15:50:52 +05:30
白鸽
6155d085d2 Drag and drop: Switch tabs on hover and preview tab insertion 2026-09-26 14:32:37 +05:30
Kovid Goyal
a3448645be
add cursor trail motio blur demo video 2026-09-26 12:49:07 +05:30
Kovid Goyal
d7cd5a18c2
Cleanup previous PR on motion blur
Move it into a separate shader
2026-09-26 12:36:01 +05:30
Kovid Goyal
0c9e4c283c
remove unused code 2026-09-26 12:19:15 +05:30
Kovid Goyal
3741b56760
Merge branch 'cursor-trail-motion-blur' of https://github.com/drone1/kitty 2026-09-26 12:18:05 +05:30
Kovid Goyal
14e5d94efe
Allow specifying regexes for URL matching on hover
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
Fixes #10518
2026-09-26 11:08:43 +05:30
Kovid Goyal
78292b4286
macOS: Re-apply custom dock icon if any after progress bar animation
Work around for macOS in some versions reverting custom icon when
content view for icon is set to nil.

Fixes #10545
2026-09-26 09:17:34 +05:30
Kovid Goyal
5f05ab7e00
Merge branch 'perf/subseq-dp' of https://github.com/4RH1T3CT0R7/kitty 2026-09-26 07:55:16 +05:30
Kovid Goyal
3aed8ffee3
Merge branch 'perf/word-diff-memory' of https://github.com/4RH1T3CT0R7/kitty 2026-09-26 07:46:59 +05:30
Kovid Goyal
b24ef1f72f
Nicer error handling for failure to launch panels
Fix #10544
2026-09-26 07:37:58 +05:30
Kovid Goyal
2a174adfbf
Merge branch 'fix-gitignore-bare-negation' of https://github.com/devangpratap/kitty 2026-09-26 07:06:23 +05:30
Artem Lytkin
8e194d8e67 diff kitten: Don't build a full LCS table for word diffs of long lines
word_diff_center filled an (m+1)*(n+1) table of ints for the differing
middle of every changed line pair. For a 100 KB line of minified
JavaScript with a word inserted near each end that is 2.6 GB and over
two seconds, and compute_centers runs the line pairs in parallel.

Changed words are only highlighted when they pair up by position, which
needs the same number of words on both sides, so return changed_center
right away when the counts differ. The output is the same as before in
that case. Lines with equal word counts but more than 2048 words between
the first and last changed word now get the central highlight too
instead of a huge table, and the table uses int32.
2026-09-25 21:41:23 +03:00
devangpratap
65f857a39a choose-files: Do not crash on a bare "!" line in an ignore file 2026-09-25 14:36:37 -04:00
Kovid Goyal
1e1486ebba
Merge branch 'fix/x11-focus-and-os-window-target' of https://github.com/jquast/kitty
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-09-25 20:58:01 +05:30
Kovid Goyal
8edc861a23
Fix #10538 2026-09-25 20:55:45 +05:30
Jonathan Lippincott
6c4170a682 Add cursor trail motion blur custom shader 2026-09-25 16:04:55 +02:00
Artem Lytkin
ef1c0fd416 subseq: Score matches with dynamic programming
score_item tried every combination of positions of the needle chars in the
item, which is exponential in the length of the query. Typing the full name
of a theme like "Solarized Dark Higher Contrast" in the themes kitten froze it
for about half a minute.

Instead find the best score for each position of each needle char from the
best scores for the previous char. The per char scores are added in the same
order as before, so the scores are bit for bit identical. When several sets
of positions have exactly the same score, the highlighted positions can be
different from before.
2026-09-25 16:46:19 +03:00
Jeff Quast
aaab61a87b ignore NotifyPointer as focus events
Problem: On X11/KDE, with two kitty windows on different virtual
desktops, switching desktops with the keyboard while the mouse pointer
sits still caused both windows to report as "focused". Keyboard input
still went to visible window, but paste and other actions went to the
other window. Fixed by ignoring FocusIn/FocusOut when ``detail ==
NotifyPointer``.

Logfile before::

    0x2 focused: 0   0x2 focused: 1   0x1 focused: 1

Logfile after::

    0x2 focused: 0   0x1 focused: 1

Video attached.  This same approach is used by Qt and Wine,

148bc4bc05/src/plugins/platforms/xcb/qxcbwindow.cpp (L2292-L2312)
9d17984f27/dlls/winex11.drv/event.c (L697)
2026-09-25 05:17:28 -04:00
Kovid Goyal
c7d4eab814
Merge branch 'fix-fish-completion-multiline-descriptions' of https://github.com/devangpratap/kitty
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-09-25 06:07:09 +05:30
devangpratap
bd3eb4c267 Completion: Do not emit multi line candidates for fish
fish splits the output of the completion function on newlines to build
the candidate list, so an option whose help text spans paragraphs added
its continuation lines as candidates of their own. Build the candidate
with the newline replacement the fish2 branch already used, so both
paths agree.
2026-09-24 14:48:28 -04:00
Kovid Goyal
becd8ed74c
Merge branch 'fix-indeterminate-progress-bar-idle' of https://github.com/j-c-m/kitty
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-09-24 21:03:09 +05:30
Jesse Miller
9ee93ae8c8 Fix indeterminate progress bar stopping when the window is idle 2026-09-24 09:20:03 -06:00
Kovid Goyal
f03c454196
Cleanup previous PR handling multi line vertical tab bar entries better 2026-09-24 19:55:45 +05:30
Kovid Goyal
2ec74e49db Merge branch 'pr10526'
# Conflicts:
#	docs/changelog.rst
2026-09-24 19:50:46 +05:30
Kovid Goyal
8e80e96c64
Custom shaders: Include border and margin in active_window_padding
active_window_padding only counted padding and cell-size compensation,
so the space a layout reserves for the window border (and margin) was
treated as outside the active window. With dim-inactive-windows this
left a thin dimmed strip around the active window and dimmed the active
border color.

Use render_data.geometry.spaces, which is exactly what the layout
reserved around the window. This respects layouts that do not reserve
border space in minimal border mode, so the active area never extends
into a neighboring window. Add a test that the reserved boxes of
visible windows never overlap and stay within the central area.
2026-09-24 19:44:10 +05:30
Kovid Goyal
b2f3c15aad
dim-inactive-windows: Do not dim the tab bar and active window padding
The builtin pipeline dimmed everything outside the cell area of the
active window, which produced a dark frame around the active window
(whose thickness varied with the size mismatch padding) and a dimmed tab
bar. Enable DIM_CENTRAL_AREA_ONLY and INCLUDE_WINDOW_PADDING.

Fixes #10524
2026-09-24 19:43:56 +05:30
Vincent Manapat
ec22e9b474 Vertical tabs: Fix rendering of the powerline tab bar style
draw_tab_with_powerline draws the separator right after the title and
blends it into the background of the next tab, which is correct for a
horizontal tab bar. In a vertical tab bar each tab has its own row,
pre-filled with the tab background, so the separator ended up in the
middle of the row, coloured as the tab on the row below, and tabs of the
same colour got a stray soft separator.

For vertical tab bars, pad the title with the tab background up to the
right edge and draw the separator there, blending into the tab bar
background, as is already done for the fade style.
2026-09-24 16:01:07 +02:00
Kovid Goyal
73f5102392
Graphics protocol: Fix memory leak when loading corrupt PNG with ICC profile
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-09-24 19:00:13 +05:30
Kovid Goyal
c02f932641
Fix an out of bounds memory access when drawing a multi line character with cursor below bottom margin 2026-09-24 18:49:35 +05:30
Kovid Goyal
c9896e8c00
version 0.49.1
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-09-24 10:08:57 +05:30
Kovid Goyal
03c278a661
also fix pipeline file retention in frozen builds and add test for it 2026-09-24 09:49:33 +05:30
Kovid Goyal
3e0b395068
Also use diskutil in a couple more scripts 2026-09-24 09:32:05 +05:30
Kovid Goyal
c6f5f0c89f
use diskutil instead of hdiutil in update-on-ox as the latter is deprecated in macOS 27. Sigh. 2026-09-24 09:25:37 +05:30
Kovid Goyal
5f736a4287
Fix #10522 2026-09-24 08:51:26 +05:30
Kovid Goyal
602b794fee
Merge branch 'fix/save-session-into-directory' of https://github.com/4RH1T3CT0R7/kitty 2026-09-24 08:40:07 +05:30
Artem Lytkin
62e5f48683 save_as_session: Show an error when the path is a directory 2026-09-23 21:58:06 +03:00
Kovid Goyal
259319c209
Update changelog
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-09-23 21:16:40 +05:30
Kovid Goyal
ae2394defa
...
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-09-23 10:45:53 +05:30
Kovid Goyal
9ea79693a2
Update changelog 2026-09-23 10:45:06 +05:30
Kovid Goyal
b6d99a8bcd
Fix #10517 2026-09-23 10:44:08 +05:30
Kovid Goyal
05f4024dcc
Fix pipeline files not being added when building package 2026-09-23 10:38:09 +05:30
Kovid Goyal
d997022881
add logging for missing uniforms in compiled GLSL
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-09-23 09:56:27 +05:30
Kovid Goyal
fc6b3b64ad
...
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-09-22 18:51:39 +05:30
Kovid Goyal
4fbd398ee6
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
Fix overlapping geometry in splits layout and various minor code
cleanups
2026-09-22 17:37:58 +05:30
Kovid Goyal
aa9ebb2067
Merge branch 'coreutils' of https://github.com/hroncok/kitty 2026-09-22 17:35:44 +05:30
Miro Hrončok
dcd67580f5 tests: accept coreutils >= 9.12 shell-quoted env output in test_ssh_env_vars
Since coreutils 9.12, env shell-quotes values written to a terminal
by default (a pty counts as one, see coreutils issue #355 for the
history: https://github.com/coreutils/coreutils/issues/355).

This makes the literal, unquoted match for TSET= in
test_ssh_env_vars no longer find the value, so the test times out
waiting for it and eventually surfaces as an EIO reading from the pty
once the child has already exited. Accept the shlex-quoted form of
the value as well, since the ssh kitten's own env-passing code does
not use env and is unaffected.

Observed failure (Fedora rawhide buildroot with coreutils-9.12-1.fc46):

    ======================================================================
    ERROR: test_ssh_env_vars (kitty_tests.ssh.SSHKitten.test_ssh_env_vars)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "kitty_tests/__init__.py", line 461, in wait_till
        self.process_input_from_child(timeout=end_time - time.monotonic())
      File "kitty_tests/__init__.py", line 449, in process_input_from_child
        data = os.read(self.master_fd, io.DEFAULT_BUFFER_SIZE)
    OSError: [Errno 5] Input/output error

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "kitty_tests/__init__.py", line 250, in wrapper
        return func(*args, **kwargs)
      File "kitty_tests/ssh.py", line 146, in test_ssh_env_vars
        pty.wait_till(lambda: 'TSET={}'.format(tset.replace('$A', 'AAA')) in pty.screen_contents())
      File "kitty_tests/__init__.py", line 464, in wait_till
        raise Exception(f'Failed to read from pty with error: {e}. {self.screen_contents_for_error()}') from e
    Exception: Failed to read from pty with error: [Errno 5] Input/output error. Screen contents as repr:
    '...\nA=AAA\nTSET=\'AAA-$(echo no)-`echo no2` !Q5 "something else"\'\n...'

    Ran 337 tests in 19.341s
    FAILED (errors=1, skipped=3)

Assisted-By: Claude Sonnet 5
2026-09-22 13:42:05 +02:00
Kovid Goyal
090f90dc4a
Report errors compiling custom shaders in the UI 2026-09-22 15:37:35 +05:30
Kovid Goyal
a908167e98
Fix the IPC lock used by custom shader compilation 2026-09-22 15:21:40 +05:30