kitty/docs
Kovid Goyal cfd2b23dca
Fix out of bounds accesses with partially scrolled off multiline chars
Scrolling down (CSI T) could cut off the lower rows of a scale > 1 text
sizing character at the bottom of the screen. Adding a combining char to
it then wrote past the end of the line buffer in add_combining_char and
rewrapping on resize read past the end of the line buffer in
copy_multiline_extra_lines.

Multiline chars that are cut off at the edge of the screen or of the
history buffer, by scrolling or by inserting lines, are partially
scrolled off and are rendered as such, so they are kept. Code walking the rows of a multiline char now only visits
the adjacent rows that actually continue the char, rather than trusting
the y and scale of a cell, so it stays in bounds and does not modify
unrelated cells for partial or torn chars.

Chars that would be torn, i.e. left with rows from unrelated lines
adjacent to their remaining part, are removed. This happens when
scrolling with margins, when a partial char is moved away from the edge
of the screen by scrolling or deleting lines, when inserting lines pushes
the lower rows of a char straddling the bottom margin out of the scroll
region, and when a partial char
cut off at the bottom is no longer at the bottom after a resize. Rewrap
drops partial chars, as it already did for chars with missing top rows,
placing cursors that were on them where the char would have been.

The checks for torn chars are skipped unless a multiline char has been
drawn in the screen, and chars cut off at the bottom of the screen,
which can only be created by scrolling down or inserting lines, are
tracked so that
linefeeds do not need to scan for them.

A hard reset now clears the alternate screen as well, so that the flag
tracking whether multiline chars have been used can be reset.

Also fix the lower rows of multiline chars being lost on rewrap when the
lines after the char were continuations that fit on its first row.
2026-11-13 10:43:13 +05:30
..
_static Cleanup previous PR 2026-10-09 20:41:46 +05:30
_templates
kittens Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
screenshots Add explicit edge resizing for Splits and preserve resize sessions 2026-10-09 19:54:02 +08:00
actions.rst
basic.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
binary.rst Add nightly version to version string for nightly builds. Fixes #10751 2026-10-27 10:43:51 +05:30
build.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
changelog.rst Fix out of bounds accesses with partially scrolled off multiline chars 2026-11-13 10:43:13 +05:30
clipboard.rst
color-stack.rst
conf.py
conf.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
custom-shaders.rst Custom shaders: Add screen-shake shaders for the bell 2026-11-05 14:32:45 +05:30
deccara.rst
desktop-notifications.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
dnd-protocol.rst Add a line to the spec to clarify that MIME types from first move only can be relied upon 2026-10-30 18:20:53 +05:30
extract-rst-targets.py
faq.rst
file-transfer-protocol.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
glossary.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
graphics-protocol.rst docs: add kmp-terminal and SSH Client for Android to graphics protocol 2026-10-29 20:58:38 +00:00
index.rst
installer.sh Also use diskutil in a couple more scripts 2026-09-24 09:32:05 +05:30
integrations.rst Add show-your-work to integrations 2026-10-11 14:09:07 +05:00
intro_vid.rst Cleanup previous PR 2026-10-09 20:41:46 +05:30
invocation.rst
keyboard-protocol.rst Add T1K to the list of terminals implementing the keyboard protocol 2026-11-10 09:53:59 +02:00
kittens_intro.rst
launch.rst More detail for on_quit events and a new on_cwd change event 2026-11-12 11:29:08 +05:30
layouts.rst Allow docking windows to the OS window with launch --type=os-window-dock 2026-11-12 12:47:48 +05:30
Makefile Fix #10577 2026-10-01 17:23:37 +05:30
mapping.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
marks.rst
misc-protocol.rst Program status protocol: fixes and improvements 2026-10-13 08:50:39 +05:30
multiple-cursors-protocol.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
notifications.py
open_actions.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
overview.rst Drag and drop: Fix issues in tab hover switching and insertion 2026-09-26 15:50:52 +05:30
performance.rst
pipe.rst
pointer-shapes.rst
press-mentions.rst
protocol-extensions.rst
quake-screenshots.rst
quickstart.rst
rc_protocol.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
remote-control.rst Further harden remote control password processing 2026-11-03 17:36:01 +05:30
requirements.txt
sessions.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
shell-integration.rst Cleanup previous PR 2026-10-18 21:33:34 +05:30
support.html
support.rst
text-sizing-protocol.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00
underlines.rst
unscroll.rst
wide-gamut-colors.rst Docs: Correct protocol references, examples and generated help 2026-10-28 13:24:43 +08:00