Commit graph

1502 commits

Author SHA1 Message Date
Egor Ignatov
0b1b477409 Fix special color encoding on 32-bit platforms
Use int64 for encoded special colors so RGB values shifted into the
upper three bytes remain positive on 32-bit platforms, while preserving
the negative sentinel values used for macOS titlebar colors.

Update the tests to use the same type, avoiding overflowing int constants
when compiling them on 32-bit platforms.
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
Marcel van der Boom
0853019e59 tty: take the TCSETS ioctl numbers from x/sys/unix
The hard-coded 0x5402/0x5403/0x5404 are the x86 (generic) values. On
powerpc TCSETS, TCSETSW and TCSETSF are 0x802c7414..6, so Tcsetattr
failed with ENOTTY and every kitten that sets terminal modes exited
at once: on ppc64le the paste confirmation (kitten ask) only flickered
and the paste was dropped. x/sys/unix defines the right value per
architecture, as already used for TCGETS in Tcgetattr and for
TIOCSETA* in tty_bsd.go. Drop the rest of the constant block too:
copied from pkg/term, unused, and also x86-only.

Verified on ppc64le: kitten ask under script(1) failed with
"inappropriate ioctl for device" (strace: ioctl 0x5402 = -ENOTTY);
with this change the TCSETS ioctl succeeds and the prompt runs.
2026-11-03 11:03:09 +01:00
Kovid Goyal
02dd29ad14
Add nightly version to version string for nightly builds. Fixes #10751 2026-10-27 10:43:51 +05:30
Kovid Goyal
52d33e2c82
zsh completion: Respect the descriptions format style for group headings
Previously group headings were hard-coded as %B<title>%b, ignoring the
user's zstyle ':completion:*:descriptions' format. This caused literal
%B/%b markers to appear with fzf-tab. Now the configured format is used,
falling back to bold titles when none is set.

Fixes #10748
2026-10-26 16:31:39 +05:30
Kovid Goyal
debcde56c0
Cleanup dangling symlink handling in atomic writes
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
Move EvalSymlinksThatExist to paths.go as it is no longer used only for
tar extraction, create the test symlinks in a deterministic order and
add a changelog entry for #10740 noting that it affects all atomically
saved files, not just clipboard output.
2026-10-25 22:23:27 +05:30
Zhizhen He
7fdd2af0fc
clipboard: Preserve dangling output symlinks 2026-10-25 22:21:52 +05:30
Kovid Goyal
1fee9e89f6
ssh kitten: Allow per-host color schemes for dark and light mode
New color_scheme_dark, color_scheme_light and color_scheme_no_preference
options. When any of them is set, the ssh kitten sends the color schemes
for all three system color schemes to kitty, which applies the one
matching the current system color scheme and switches between them when
the system color scheme changes. color_scheme is used for modes without
a specific color scheme.

The colors are applied in a new session color layer, above the colors of
the window and below colors set by programs. They are associated with the
color stack entry pushed by the ssh kitten and are removed when it is
popped, so nested sessions work and the colors are restored on exit.

Configs that only use color_scheme continue to use escape codes exactly
as before, as does the kitten when running inside tmux.

Fixes #10724
2026-10-23 09:37:50 +05:30
Kovid Goyal
8e4780f8ec
Fix crash with damaged images in set-window-logo/set-background-image
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
image.Decode failures fell through to encoding a nil image, causing a
panic. Read the image into memory instead of streaming from an open file,
which also fixes file descriptors leaking on the DecodeConfig error path
and for PNG images, which were never closed. Include the path in decode
errors and drop the wasteful raw RGBA sized buffer preallocation.

Closes #10715
2026-10-21 22:38:43 +05:30
Kovid Goyal
f9bd7c2085
set-spacing: Accept the *-horizontal and *-vertical edge names in kitten @
The Go parser had its own copy of the edge name mapping, which had drifted
from the Python one. Generate the Go mapping from the Python one so there
is a single source of truth, and share the documentation of the spacing
syntax between set-spacing and launch --spacing, documenting the long
forms.

Closes #10712
2026-10-21 10:20:35 +05:30
Kovid Goyal
8da5bf3f7c
set-colors: Fix encoding of colors with special values in the Go client
wayland_titlebar_color, macos_titlebar_color, scrollbar_handle_color and
scrollbar_track_color store a special value in their lowest byte with
actual colors shifted into the upper bytes. The Go client sent them as
plain RGB values, so kitty interpreted the blue component as the special
value, for example, scrollbar_track_color=#ff0000 used the foreground
color. It also rejected special values such as background and dark.

Encode them the same way as the Python parsers do.
2026-10-20 07:39:42 +05:30
Kovid Goyal
48674a7869
set-colors: Clean up parsing of colors and conf files
Pass the CLI options to parse_colors_and_files instead of reading
global state, and have it set all and configured when reset is
specified, matching the Python client.

Read conf files with the standard config parser so that tabs,
indentation, long lines and include directives work, and report
invalid colors instead of silently ignoring them. Non-color settings
and special values of colors such as wayland_titlebar_color are still
ignored, as in the Python client.

Allow special_parse functions to take over fields that are backed by
options in the generated Go remote control code.
2026-10-20 07:32:15 +05:30
Zhizhen He
de43c108f5
set-colors: Ignore color arguments when resetting colors
Skip color argument parsing for --reset, as documented and already done
by the Python command path. Add a payload-creation regression covering
invalid colors, missing files and valid colors with and without reset.
2026-10-20 00:54:13 +08:00
Kovid Goyal
9a8c61d402
set-background-opacity: Reject NaN and improve the invalid opacity error
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
Go's min/max propagate NaN, so "nan" got past parse_opacity and failed
later with an unclear json.Marshal error, while the Python parser
silently clamped it to 0. Reject NaN in both, report a clear error
message for invalid opacity values, and replace the regression test with
a table test of parse_opacity covering clamping and invalid inputs.
2026-10-19 21:36:00 +05:30
Zhizhen He
5f5ae32753
set-background-opacity: Reject invalid numeric arguments
Return ParseFloat errors instead of silently treating malformed input as zero opacity. Add a payload-creation regression and changelog entry.
2026-10-19 23:42:39 +08:00
Hassan Raza
a77b763960
Cover missing values after grouped and repeated options 2026-10-18 11:47:32 +05:00
Hassan Raza
608e46be33
Reject options whose required value is missing 2026-10-18 11:46:17 +05:00
Hassan Raza
b1df817c44
Cover missing values on CLI option aliases 2026-10-18 11:45:33 +05:00
Kovid Goyal
f426c08f5d
Apply deferred directory permissions children first when extracting tar
A parent directory without search permission prevents changing the
permissions of its children, so apply the deferred chmods in reverse
order, as GNU tar does. Also add a test and changelog entry for #10676.
2026-10-16 19:12:51 +05:30
devangpratap
6e41991430 Fix extracting tar archives with read-only directories 2026-10-16 09:26:26 -04:00
Kovid Goyal
535c7502e8
Graphics protocol: Add indexed color image formats
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
Add two new image formats, f=8 with one byte per pixel that is an index
into the terminal color palette and f=16 with a palette index followed by
an alpha byte. Indices 0-247 are the SGR 256 color table entries and
248-255 are special colors: default background, default foreground,
selection background and foreground, cursor, cursor text, URL color and
one reserved slot. Such images change color automatically when the
terminal colors change.

The images are uploaded as integer textures and drawn by a separate
shader program that looks up colors in the existing per window color
table uniform block, so a color scheme change costs nothing extra and
rendering of normal images is unaffected. Programs are switched only at
boundaries between runs of indexed and normal images in draw order. The
shader does bilinear filtering after the palette lookup since integer
textures cannot be filtered. Animation and frame composition are not
supported for these formats.

Closes #10666
2026-10-15 22:05:23 +05:30
Kovid Goyal
32a77d3cf7
Fix colors 16-255 being set to white by ssh and themes kittens when theme leaves them unset
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 #10661
2026-10-13 14:03:22 +05:30
Kovid Goyal
ed0d236708
Program status protocol: fixes and improvements
- Use the SIMD base64 decoder
- Allow ids of up to 263 bytes, the 128 byte limit in the spec is an error
- Drop transient records when a program run with launch --hold exits, even without shell integration
- Drop done and error records when a key is pressed in the window
- Only build the records list when there are watchers
- Count the raw bytes of a report against the length limit
- Strip only ASCII whitespace and discard reports with over long keys regardless of case
- Identical reports do not change which record is shown in the tab bar
2026-10-13 08:50:39 +05:30
Kovid Goyal
7a751292bb
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
Replace exported get_dir files atomically so paths returned by Get/Add
never briefly vanish while another worker re-exports the same key.
Don't panic in Get for a key folder missing from entries.json.
Propagate errors from unlocking, document the lock()/unlock() contract,
and fix the NewDiskCache lock error test which checked the wrong cache
2026-10-11 12:11:06 +05:30
Zhizhen He
d91ab369e4
Fix locking during concurrent disk cache access 2026-10-11 12:56:24 +08:00
Kovid Goyal
b00de8c4bb
more minor fixes inspired by previous PR 2026-10-10 11:29:31 +05:30
Zhizhen He
de1dc36597
Fix extraction of nested tar hardlinks 2026-10-10 13:16:40 +08:00
Kovid Goyal
e55d14085a
Cleanup previous PR
- Parse in-band resize reports robustly: require the 48; prefix, accept
  extra parameters and reject negative values instead of panicking
- Handle bracketed paste in parse_input_from_terminal with a dedicated
  scan for the end of paste marker so pasted escape bytes are never lost
- Guard against NaN in scroll_by_pixels and scroll_to_absolute, clamp
  negative absolute scroll targets, let infinite fractional scrolls clamp
  and propagate overflow errors from PyLong_AsDouble
- Empty disk cache entries no longer claim offset 0 in the cache file and
  defrag only moves entries actually written to disk
- Reject zero and too large block sizes in rsync signature headers
- Only replace the encryptor tag once it has been read successfully
2026-10-09 18:37:48 +05:30
rudolf-blue
ba21f4a74a Fix division by zero when the terminal reports a zero size 2026-10-09 07:40:55 -04:00
Kovid Goyal
fb68ed81e0
Fix #10634
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-10-09 13:53:34 +05:30
rudolf-blue
799963bc38 Dont leak the reader goroutine in roundtrip_to_terminal 2026-10-08 12:00:20 -04:00
Kovid Goyal
a5c75acb7d
handle invalid UTF-8 in binary mime db
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-10-06 08:58:50 +05:30
Kovid Goyal
c168e31801
Use binary XDG shared MIME database for mimetype lookups
Fixes #3056
2026-10-06 08:27:55 +05:30
devangpratap
632265ec33 Do not stay in the escape state after a backslash-newline in StringLiteral
The empty case '\n' in the backslash state was meant to drop a
backslash-newline pair like Python's python_string does, but it never
reset the state, so the next character was parsed as an escape.
2026-09-29 12:27:24 -04:00
Kovid Goyal
5f05ab7e00
Merge branch 'perf/subseq-dp' of https://github.com/4RH1T3CT0R7/kitty 2026-09-26 07:55:16 +05:30
devangpratap
65f857a39a choose-files: Do not crash on a bare "!" line in an ignore file 2026-09-25 14:36:37 -04: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
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
b6d99a8bcd
Fix #10517 2026-09-23 10:44:08 +05:30
devangpratap
c7226d702e Do not drop an escaped U+FFFD in the shlex lexer
write_escaped_ch compares the decoded rune against utf8.RuneError to
detect invalid UTF-8, but a literal U+FFFD decodes to that same rune, so
an escaped replacement character was silently deleted. The size returned
by DecodeRuneInString already tells the two apart: invalid bytes decode
with a size of one, a real U+FFFD with a size of three. Keep the rune
when the size is greater than one.
2026-09-21 12:05:20 -04:00
Kovid Goyal
1fb52b8443
Cleanup previous PR and make VS15 on explicit width cell behavior consistent with VS16 2026-09-18 22:59:19 +05:30
Kovid Goyal
c444b942ef
Merge branch 'thai-sara-am' of https://github.com/noomz/kitty 2026-09-18 20:54:46 +05:30
devangpratap
62a4b451d4 Do not offer symlinks to directories as executables in completion
CompleteExecutablesInPath excluded directories with e.IsDir(), but that is false
for a symlink pointing at a directory. Directories are executable in the
access(2) sense, so such a symlink sitting in a PATH entry passed the X_OK check
and was offered as a command. Use the existing is_dir_or_symlink_to_dir helper,
which already makes this distinction elsewhere in the file.
2026-09-16 20:17:32 -04:00
devangpratap
579c735014 Use GuessMimeType for mime based completion
complete_by_mimepat called mime.TypeByExtension directly, so it saw only the
extensions the Go standard library knows about. Everything else in kitty that
needs a mime type goes through utils.GuessMimeType, which also consults the
user's mime.types, kitty's builtin types and KnownExtensions. As a result
files like foo.py or foo.toml were not offered when completing arguments that
ask for text/*, even though kitten pager opens them as text.
2026-09-16 05:43:17 -04:00
devangpratap
ebb41b83da Fix completion of directories containing files with uppercase extensions
Completion patterns are lowercased in make_completer and file names are
lowercased before being matched against them, but the names of files inside
a directory were passed to the matcher unchanged. A directory whose only
matching file was named something like B.CONF was therefore never offered as
a completion candidate for a *.conf pattern, while the same file named
b.conf worked.
2026-09-16 00:43:53 -04:00
Siriwat Uamganmsup
0b29c33e89 Widen the cell for Thai/Lao vowel sign AM (U+0E33, U+0EB3)
These two code points have Grapheme_Cluster_Break=SpacingMark but a
width of one, the only such code points in Unicode. Grapheme
segmentation (GB9a) adds them to the previous cell, so "จำ" occupied a
single cell in kitty while wcwidth() based programs count two. As a
result the SARA AA glyph was clipped, only the nikhahit was visible and
the cursor drifted right by one cell per AM.

Now, when such a code point combines into a plain one cell wide cell,
the cell is widened to two cells, using the same mechanism as U+FE0F
does for narrow emoji. The C and Go wcswidth() implementations are
updated to match so that kitty's own width calculations agree with the
screen.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 10:43:49 +07:00
devangpratap
04082039be Fix completion of symlinks to directories for directory arguments 2026-09-15 14:09:41 -04:00
devangpratap
fd904d45d8 Fix completion of paths directly under the root directory 2026-09-15 11:15:04 -04:00
Anand Hegde
8b564c7094 Go shlex: Do not drop empty quoted strings
Port the fix from 2093fb131 in the C shlex implementation to the Go one.
Previously an argument such as "" or '' was silently dropped, since an
empty word was also used to signal EOF. So "launch --title '' vim" in the
kitty shell was parsed as "launch --title vim". EOF is now signalled with
a negative Pos.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MA8JGs7pCoXFL2W6jEJ8sD
2026-09-14 16:09:51 +05:30
Anand Hegde
0791b39abb Fix completion after a trailing space in the kitty shell
SplitForCompletion computed the position of the new empty word as if
the previous word were one byte long, so tab completing after a space
following a multi-character word replaced part of that word. For example,
completing "launch --type " in the kitten @ shell produced
"launch --window ". The new word starts at the end of the input.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MA8JGs7pCoXFL2W6jEJ8sD
2026-09-14 16:09:05 +05:30