kitty/kitty_tests
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
..
__init__.py
atexit.py
base.py More detail for on_quit events and a new on_cwd change event 2026-11-12 11:29:08 +05:30
CascadiaCode-Regular.otf
check_build.py
child.py More useful error message for flaky test failure 2026-10-26 06:50:34 +05:30
choose_files.py
clipboard.py clipboard: Replace the MIME list PTY test with a Go unit test 2026-10-26 07:50:36 +05:30
ComfyCode-Regular.ttf
command_palette.py Fix #10711 2026-10-21 10:45:01 +05:30
completion.py
crypto.py Encrypt sessions saved at logout with a key in the macOS Keychain 2026-10-16 11:57:31 +05:30
datatypes.py Fix PNG dimension validation test on 32-bit platforms 2026-11-09 13:01:06 +03:00
dnd.py dnd: Accept base64 payloads with trailing padding 2026-10-30 18:16:47 +05:30
dnd_kitten.py Cleanup previous PR 2026-10-29 21:41:44 +05:30
docks.py Allow docking windows to the OS window with launch --type=os-window-dock 2026-11-12 12:47:48 +05:30
edit_in_kitty.py
file_transmission.py Transfer kitten: Replace existing links when receiving files 2026-10-21 20:35:07 +05:30
FiraCode-Medium.otf
fonts.py Scale box drawing, cursor and title bar border line thickness with font size 2026-10-23 10:18:23 +05:30
glfw.py
gr.py
GraphemeBreakTest.json
graphics.py fix failing test 2026-11-11 14:15:05 +05:30
hints.py
iosevka-regular.ttf
iterable_arguments.py
keys.py
layout.py More detail for on_quit events and a new on_cwd change event 2026-11-12 11:29:08 +05:30
LiberationMono-Regular.ttf
main.py tests: Reuse existing resource enumeration helper 2026-11-06 19:17:39 +08:00
mouse.py Reset link hover pointer when output clears the highlight 2026-10-23 17:02:12 +05:30
multicell.py Fix out of bounds accesses with partially scrolled off multiline chars 2026-11-13 10:43:13 +05:30
notifications.py Linux: Send kitty's .desktop file name to notification servers for grouping 2026-10-23 08:47:19 +05:30
notify.py
open_actions.py Cleanup previous PR 2026-10-31 17:15:08 +05:30
options.py Cleanup patch_global_colors special color decoding 2026-11-09 19:03:53 +05:30
panels.py
parser.py Graphics protocol: Add sub-feature querying 2026-10-25 09:59:12 +05:30
program_status.py Cleanup previous PR 2026-10-13 21:05:16 +05:30
remote_control.py Further harden remote control password processing 2026-11-03 17:36:01 +05:30
resize_edge.py Cleanup previous PR 2026-10-09 19:51:38 +05:30
resize_fraction.py Add configurable fractional steps to window resizing 2026-10-09 19:54:02 +08:00
screen.py More detail for on_quit events and a new on_cwd change event 2026-11-12 11:29:08 +05:30
search_query_parser.py
selection_drag.py Respect mouse mappings for link hover feedback 2026-10-23 05:08:02 +08:00
sessions.py Allow docking windows to the OS window with launch --type=os-window-dock 2026-11-12 12:47:48 +05:30
shell_integration.py Bash integration: Source the system startup files bash was built with 2026-11-07 06:25:36 +05:30
shm.py
single_instance.py
slang.py Custom shaders: Add command and alternate screen events and uniforms 2026-11-05 08:43:37 +05:30
ssh.py ssh kitten: Fix remote directories being created world writable 2026-11-10 08:15:26 +05:30
tab_bar.py Fix #10810 2026-11-05 20:46:52 +05:30
tab_drop.py Drag and drop: Fix dropping a window on a temporarily shown title bar 2026-10-21 06:03:46 +05:30
tab_workspaces.py Fix #10627 2026-10-10 10:05:17 +05:30
tui.py
twemoji_smiley-cff2_colr_1.otf
utmp.py