A shader that draws content away from where kitty put it, such as crt
curving the screen, makes clicks and selections land on the wrong cells,
since kitty maps the pointer to the unmodified cell grid. Up to several
columns near the edges with the bundled crt shader.
Shaders can now define pointer_map(pos, d), returning where the content
shown at pos actually is. kitty renders it into a 64x64 grid when the
pipeline or viewport size changes, reads it back once, and uses it to
move all pointer events. Only always active groups that draw to the
screen are used, since only they move content permanently.
The crt shader defines it, sharing its warp function with fragment_main().
Do not show subtitles by default and fix transcription errors in the
subtitle files: kitty.conf, MIME type, --hyperlink=auto, WeeChat,
switch windows, and use lowercase kitty consistently.
- Only restore entry sizes in the Splits layout resize mode was opened in;
otherwise fall back to the default reset rather than refusing to reset
- Do not take a snapshot lazily from already resized sizes when resize mode
was opened in another layout
- Running the resize kitten while its overlay is open replaces the overlay so
the new options take effect, keeping the original-size snapshot
- Newer edge statuses replace older local messages, and edge failures beep
- Switching strategy no longer discards a --fraction command-line override
- Compute divider room without deep copying the pair subtree
- Fractional resize in other layouts adopts the probed state instead of
replaying every step
- Back off on all accept() errors that leave the connection pending, not
just resource exhaustion, so the talk thread cannot spin on a readable
listener
- Use an atomic for the test only accept failure injection instead of
taking the talk mutex on every accept
- Encrypt disk cache entries in chunks of up to 1MB to reduce the number
of write syscalls for large images
- Have GlobalWatchers.set_extra() invalidate the cached watchers
English and Spanish subtitle tracks for the intro video. AI tooling was used
to sync the transcript against the video and to translate it; both tracks
were then manually proofread line by line.
The WebVTT files are shipped in docs/_static, since Sphinx copies that
directory into the output and the video itself is hosted outside the
repository.
Co-Authored-By: space-bunny-free <noreply@opencode.ai>
When growing the buffer, realloc was passed the element count instead of
the byte count, shrinking the buffer while capacity was set to the larger
value. Lines with more than 4096 codepoints (e.g. many combining chars)
would then write past the end of the allocation.
Fix dangling text pointer in buffered key events and test CSI param overflow
Key events buffered while waiting for an overlay to become ready stored
the text pointer from the GLFWkeyevent, which is only valid for the
duration of the key callback. Make the buffered events own a copy of
the text and free it in a single place.
Also add a test for the out of bounds write of is_sub_param when a
separator follows the last allowed CSI parameter.
A full screen reverse scroll (ESC M at the top, CSI T) moves every image
ref down a row. scroll_filter_func() only removed refs that left through
the top, so a cell image on the bottom line ended up at row `lines`, off
screen, while its line was discarded. The next forward scroll brought it
back onto the bottom row, where the line has no placeholders.
screen_render_line_graphics() returns early for such lines, so nothing
removed the ref and a slice of the old image was drawn over the new text.
tmux and pagers send ESC M when scrolling down, so this shows up in
practice. Fix it by dropping cell image refs that move below the bottom
margin, the same way the margins scroll path drops refs that leave the
region.
This replaces PR #10623, which was not merged for these reasons:
- It does not find the cause. It removes cell image refs at render time
for every line without placeholders, so the stale ref still exists and
is still seen by anything that reads refs before the next render, such
as graphics query and delete commands and the paused rendering path,
which returns before the new code.
- It costs time on every frame. Whenever any image is loaded, even with
no placeholders at all, each clean visible line and each visible
history line triggers a walk over all images and refs. Before, such
lines cost nothing. This fix adds one comparison to a loop that only
runs when the screen scrolls.
Close#10623
The scale between scaled and unscaled offsets was only calculated for
positive deltas, so when scrolling up or left it stayed at zero (or stale from
a previous scroll), causing momentum events to have zero offsets.
Closes#10610
Turn glfw touch events into mouse and scroll events. A tap is a left
click where the finger landed, a finger that moves scrolls through the
glfw momentum scroller so it coasts like touchpad scrolling, and a
finger held still before it moves drags the left button, selecting
text. Only the first finger of a sequence is used. Touch events are
printed by --debug-input.
The compensatory padding at the left and right of a window extends alongside
its title bar, but the padding shader only drew it alongside the rows of the
terminal screen, leaving the strips beside the title bar unpainted. Draw them
when rendering the title bar, colored to match the neighboring title bar cell.
Draw the compensatory padding (the pixels left over after fitting whole
cells) inside the window border instead of outside it, so the border is
always exactly one margin inside the area allocated to the window. Windows
that share an allocation edge now share a frame edge and all gaps are the
sum of the neighboring margins. Cell counts and content positions are
unchanged. Mouse hit testing includes the compensatory padding.
Move the compensatory padding away from the window title bar so the title
bar is always flush with the border, computing blank rects from the final
window geometries at the end of a layout pass.
Add the collapse_window_margins option to have the margins of neighboring
windows collapse into each other.
Fix the Grid layout not recording compensatory padding and ignoring
vertical placement_strategy values.
Based on #10508 without needing a constraint solver.