Commit graph

19617 commits

Author SHA1 Message Date
Kovid Goyal
beca032240
Ignore initial OS Window positions that are not on any monitor
This applies to --position, remember_window_position and positions from
sessions, which could otherwise place the window on a monitor that is no
longer connected.
2026-10-16 11:27:13 +05:30
Kovid Goyal
6a3cfbcb10
Sessions: Fix os_window_size being ignored when remember_window_size is enabled
A size specified in the session now takes precedence over both the
remembered size and the remembered maximized state.
2026-10-16 11:26:53 +05:30
Kovid Goyal
92e2fc477c
Fix on_quit watchers being called repeatedly when they abort an OS quit request
When an on_quit watcher aborted a quit, the application quit request was
left as CONFIRMABLE_CLOSE_REQUESTED, so process_pending_closes() called
boss.quit() on every tick.
2026-10-16 11:26:07 +05:30
Kovid Goyal
10b3792dfb
misc improvements for indexed color images 2026-10-16 11:13:14 +05:30
Kovid Goyal
8e99fba8ec
Fix #10668
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-16 07:35:45 +05:30
Kovid Goyal
b954c5818b
Merge branch 'docs-load-config-file' of https://github.com/ihsandeniz/kitty 2026-10-16 07:19:33 +05:30
Kovid Goyal
50ede63f29
... 2026-10-16 07:05:23 +05:30
ihsandeniz
cfe7241de7 Docs: use load_config_file in the reload_config_file example 2026-10-15 23:13:03 +03: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
7dbfb0e1ce
Custom shaders: Use pointer_map() of groups turned on and off by events
Groups that are active until an event turns them off, such as those
using animation_toggle, now also move pointer events, while they are
active. The pointer map is recomputed only when the set of active such
groups changes, and pointer events are left alone once all of them have
been turned off.
2026-10-15 21:27:18 +05:30
Kovid Goyal
28aad4345e
Custom shaders: Allow controlling shaders with key presses
Add a shader_event action that sends user:<name> events to the custom
shader pipeline, and an animation_toggle pipeline directive to turn
groups on and off with an event. User events occupy the bits above the
builtin events in a now 64 bit event mask, so firing them costs no more
than any other event and groups that are off are not drawn at all.

Fixes #10667
2026-10-15 20:56:31 +05:30
Kovid Goyal
0d006c44b3
Fix CPUCell not being zero initialised by clang on ARM
Some checks failed
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Has been cancelled
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Has been cancelled
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Has been cancelled
CI / Linux package (push) Has been cancelled
CI / Bundle test (macos-latest) (push) Has been cancelled
CI / Bundle test (ubuntu-latest) (push) Has been cancelled
CI / macOS Brew (push) Has been cancelled
CI / Test ./dev.sh and benchmark (push) Has been cancelled
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (c, macos-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Has been cancelled
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Has been cancelled
Depscan / Scan dependencies for vulnerabilities (push) Has been cancelled
2026-10-14 13:35:21 +05:30
Kovid Goyal
5bf3c2dc67
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
2026-10-13 21:05:16 +05:30
Kovid Goyal
1fb26b8f13
Merge branch 'codex/fix-duplicate-program-status' of https://github.com/hezhizhen/kitty 2026-10-13 20:56:12 +05:30
Zhizhen He
ee491f4d44
Program status: Preserve displayed progress on identical reports 2026-10-13 22:29:38 +08:00
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
4b977494c5
... 2026-10-13 09:34:02 +05:30
Kovid Goyal
39b55885ba
Ignore bold and italic when looking for a fallback font for private use characters
The glyph for a private use codepoint depends on the font, not the style.
Looking for a bold or italic font covering it tends to find an unrelated
text font that happens to cover it, for example Liberation Serif Italic for
the Nerd Font check mark U+f00c, which rendered as a thin line in the bold
italic title of the active tab.

Restrict the style-ignoring fallback lookup to the Private Use Area ranges
of the Nerd Fonts glyph sets, so that other private use codepoints, which
may be used by fonts that do have styled variants, keep their style.
2026-10-13 09:26:29 +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
0e1b7f4812
Merge branch 'feat/osc-7501-program-status' of https://github.com/ttys3/kitty 2026-10-13 08:29:47 +05:30
Kovid Goyal
163e271250
Fix #10658 2026-10-13 08:21:05 +05:30
Kovid Goyal
8aaa161fb8
Custom shaders: Compute dropped named textures once and reset persist generation only when freeing
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-12 22:34:16 +05:30
Kovid Goyal
b9bd3be1a8
Merge branch 'fix-named-texture-fbos' of https://github.com/koolkhel/kitty 2026-10-12 22:33:41 +05:30
ttyS3
eeb30d7b77
feat: show the number of windows in the most urgent program status
When several windows in a tab report a program status, tab.program_status
now appends the number of windows in the most urgent status, e.g. two
windows blocked on the user. Ties between windows are broken by the most
recently updated record instead of the window order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:31:38 +08:00
ttyS3
00f7a0abd5
feat: support the Program Status Protocol (OSC 7501)
Implement revision 0.4 of the Program Status Protocol, which lets a
program report whether it is idle, working, done, blocked on the user
or failed, and why.

- Parse and validate reports per the spec: limits, base64 text without
  control characters, malformed ids discard the report instead of
  falling back to the root record, unknown states are ignored
- Keep up to 256 records per window (LRU eviction), with clear removing
  a record and its descendants and app inherited from ancestors
- Reply to the feature detection query with supported states and kinds
- Lifetime: working/blocked/idle records are dropped at a new shell
  prompt (OSC 133;A), done/error are dropped when the window gets focus,
  a full reset (RIS) removes every record
- Expose records via tab.program_status in tab_title_template, the
  output of kitten @ ls and a new on_program_status_change watcher

Spec: https://www.superlogical.com/rex/docs/build/program-status
Ref: ghostty-org/ghostty#14560, ghostty-org/ghostty#14630

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:31:38 +08:00
Iurii Lunev
3046d28e9f
Custom shaders: Fix stale framebuffers for re-declared named textures
When a pipeline does not declare the a, b or persist textures they are
freed, along with the per window framebuffers for them, but the per window
generation counters are left alone. Loading a pipeline that declares them
again recreates the textures without recreating the framebuffers, since the
generations still match. Passes into those textures then bind framebuffer 0,
which is the backbuffer, so they draw over the terminal contents and only
what the shader draws by itself remains visible.

Reset the generations when the textures are freed, so that the framebuffers
are attached afresh when the textures come back.
2026-10-12 16:24:07 +03:00
Kovid Goyal
2b6fc313c2
Merge branch 'dependabot/go_modules/all-go-deps-49ece02e14' of https://github.com/kovidgoyal/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-10-12 17:16:40 +05:30
dependabot[bot]
5ac4f73e65
Bump github.com/nwaples/rardecode/v2
Bumps the all-go-deps group with 1 update: [github.com/nwaples/rardecode/v2](https://github.com/nwaples/rardecode).


Updates `github.com/nwaples/rardecode/v2` from 2.4.1 to 2.4.2
- [Commits](https://github.com/nwaples/rardecode/compare/v2.4.1...v2.4.2)

---
updated-dependencies:
- dependency-name: github.com/nwaples/rardecode/v2
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-12 09:34:07 +00:00
Kovid Goyal
03951c9695
autoformat
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-12 12:55:04 +05:30
Kovid Goyal
2bab3ccb18
macOS specific changes for wheel events PR 2026-10-12 12:37:58 +05:30
Kovid Goyal
e0382c0138
mouse_map: Allow mapping horizontal scrolling with wheel_left and wheel_right
Both axes of a scroll event are dispatched, so a diagonal gesture can fire
both, and the event is consumed if either axis is mapped. An unmapped event
continues a mapped gesture only if it scrolls along axes without any mappings.
2026-10-12 11:25:25 +05:30
Kovid Goyal
2d57c2201d
Cleanup previous PR
- Only call into Python for scroll events when the wheel is mapped for the
  current modifiers and mode, using a bitmap of wheel mappings built in
  set_options(), and only when a step completes
- Do not swallow the momentum of an unmapped gesture that follows a mapped one
- Do not carry a partial step over to a different window or modifiers or
  across unmapped scrolling
- Count wheel steps without relying on the mouse tracking mode semantics of
  scale_scroll()
- Return the result of the mapped actions from on_mouse_event()
- Ignore mouse_selection for the wheel, it would never be released
- Add integration tests for scrolling with wheel mappings
2026-10-12 11:06:32 +05:30
Kovid Goyal
0ae80efa10
Merge PR #10590: Allow mapping the scroll wheel with mouse_map
# Conflicts:
#	docs/changelog.rst
2026-10-12 11:00:08 +05:30
Kovid Goyal
fb9bdf7dfd
autoformat 2026-10-12 10:01:50 +05:30
Kovid Goyal
fe163af599
Merge commit '085a2e4010' 2026-10-12 10:00:20 +05:30
Kovid Goyal
085a2e4010 Cleanup previous PR
- Use SampleLevel() for the sprite samples in the cell fragment shader.
  They are now inside a branch that is not uniform across a 2x2 pixel
  quad at cell boundaries, where implicit derivatives are undefined. The
  sprites texture has no mipmaps so LOD 0 is identical.
- Pack the skip text flag into the existing flat underline_exclusion_pos
  varying instead of adding another one, to not reduce varying headroom
  on older drivers that do not pack flat ints with floats.
- Make the requirement that callers rewrite every byte of an invalidated
  buffer explicit with a dedicated alloc_and_map_vao_buffer_for_full_rewrite()
  and drop the now unused frequently_updated parameter.
- Cross reference text_composition_strategy() in C and
  text_contrast_is_identity() in Python so they are kept in sync.
2026-10-12 09:57:24 +05:30
Kovid Goyal
0931296a15 Merge PR #10652: Skip foreground samples for blank cells 2026-10-12 09:53:57 +05:30
Kovid Goyal
4fa2cf249d
Cleanup previous PR
Require ModeSymlink when checking the SymlinkToDir marker as it shares a
bit with the other-execute permission, use a single helper for the check,
avoid stat() on hidden entries that will be skipped and treat symlinks to
directories as directories in save file path completion.
2026-10-12 09:36:21 +05:30
Kovid Goyal
f390eec17d Merge branch 'pr-10653' 2026-10-12 08:09:09 +05:30
Zhizhen He
38ed84edf5
choose-files: Handle symlinks to directories
Recognize the existing directory-symlink marker when scanning, filtering
and deciding which results can be selected. Resolve symlinks before file
filters and cover directory selection and filtered navigation.
2026-10-12 10:08:06 +08:00
Jesse Miller
c57495436d Skip foreground samples for blank cells
The cell fragment shader sampled the glyph, underline, strike, cursor, and underline-exclusion texels for every cell. A space is sprite 0, and that sprite is empty, so those samples add nothing. The vertex shader now sets skip_text when the glyph, both decoration indices, and the cursor sprite are all zero. The fragment writes the background it already computed and skips the samples. A block cursor is sprite 0, so its color stays in the background. An underline, strike, URL underline, or beam, underline, or hollow cursor still samples. The foreground-only pass writes zero for a skipped cell.

On Linux, platform text composition is gamma 1 and contrast 0, which is pow(alpha, 1) * 1. TEXT_CONTRAST_IDENTITY compiles that function down to returning the color unchanged. legacy and any other numbers keep the old math. A config reload that crosses that line rebuilds the cell programs. The identity flag is only varied when the new gamma path is on, so the cell programs go from 18 to 27.
2026-10-11 10:38:17 -06:00
Jesse Miller
f5e18f430a Orphan cell and selection buffers when mapping them
Frequently updated buffers were mapped with glMapBuffer. If the GPU is still reading that storage, the map waits. GL_MAP_INVALIDATE_BUFFER_BIT tells the driver it may keep the old storage for the in-flight draw and hand the CPU a new one. The cell upload and the selection upload already rewrite every byte, which this flag requires. Borders and padding still use the plain map.

This does not change a normal terminal frame on a modern GPU. On Wayland the next upload waits for a frame callback, and the cell draw finishes well inside that refresh. The map blocks only when one draw lasts longer than the gap before the next upload, which is software GL or a heavy custom shader, not scrolling or a TUI.
2026-10-11 09:31:58 -06:00
Kovid Goyal
b78a6aa30f
Merge branch 'add-show-your-work' of https://github.com/iamumeransari/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-10-11 20:23:29 +05:30
Kovid Goyal
216c77fdda
Fix #10651 2026-10-11 20:22:52 +05:30
Umer Ansari
7d9ca1b060 Add show-your-work to integrations 2026-10-11 14:09:07 +05:00
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
Kovid Goyal
faa50dfdcb Merge PR #10648: Fix locking during concurrent disk cache access 2026-10-11 12:02:56 +05:30
Zhizhen He
d91ab369e4
Fix locking during concurrent disk cache access 2026-10-11 12:56:24 +08:00
Kovid Goyal
2414d64e67
Keep the IME anchor following the cursor when child output moves it
Key presses update the IME position, but cursor motion caused by child
output, such as the echo of committed text, did not. The next composition
then started with a stale anchor and its candidate window briefly appeared
at the old position before jumping to the cursor.

Once an IME composition has been seen, push the cursor position to the IME
whenever it changes outside a composition in the active window of the
focused OS window. Nothing extra happens until an IME is used, and there is
no timer, so no feedback loop with GNOME's done events.

Closes #10644
2026-10-11 09:46:17 +05:30
Kovid Goyal
0a9c1f0112
Cleanup previous PR
Fix the input wake scheduling issues

- Never stall input the main loop was woken for: the main thread parses on
  signal turns too and accepts any chunk the I/O thread woke it for, and a
  chunk is only marked as woken from the state the wake was decided on.
- Keep held deadlines across a wake and drop the duplicate main loop timer
  for held input, so a held chunk is scheduled once.
- Accept a small chunk that grows before the main thread parses it, rather
  than refusing it and needing another round trip.
- Only skip painting an OS window when none of its windows parsed new input,
  and find held windows without a per screen search.
- Query only parsers that were read or have pending input, without taking
  the children lock, and wake for removed children only when the main thread
  did not request the close.
- Share one classification of pending input between the parser and the
  I/O thread.
2026-10-11 07:20:41 +05:30