kitty/kitty_tests
amoena 207b22aa80
fix(erase_last_command): erase the most recent command even empty output
erase_last_command selected the region to erase via find_cmd_output(..., -1),
which anchors on OUTPUT_START (OSC, 133;C). Commands that produce no output
(an empty Enter, a comment, cd, export, etc. -- never emit 133;C, so they were
skipped and an older command-with-output was erased instead. "Erase the last
command" therefore did not erase the last command whenever the most recent ones
has no output.

Select the region by prompt marks instead: erase the prompt block immediately
above the current (live) prompt, whatever it contains. Every submittd command
is now one unit, removed newest-first, one prompt block per invocation.

This also fixes two latent defects in the previous implementation:

* The on-screen deletion was anchored at `cursor->y - count`, which
  assumes the region ends exactly one row above the cursor.
  Multi-line prompts and skipped rows broke that assumption and left
  residual lines. Anchor at the top of the region instead.

* When part of the erased region was in the scrollback, the lines
  were removed from the history buffer but no redraw was signalled,
  so the deletion of the off-screen lines only became visible after
  the next scroll event recomputed the history viewport. Clamp
  scrolled_by to the new history length and call dirty_scroll()
  after shrinking the buffer.

include_prompt is retained for API compatibility but is now a no-op: the
unit erased is always the whole prompt block.
2026-06-28 11:17:01 -03:00
..
__init__.py
atexit.py
CascadiaCode-Regular.otf
check_build.py Enable ASAN for macOS CI builds in ci.py 2026-06-24 10:01:29 +05:30
clipboard.py
ComfyCode-Regular.ttf
command_palette.py
completion.py
crypto.py
datatypes.py Change set_uint_at_address to use METH_FASTCALL, skip ctypes test on intel macs 2026-06-25 10:49:19 +00:00
dnd.py fix drop_update_mimes: use exact MIME matching and correct sentinel value 2026-05-17 16:45:07 +00:00
dnd_kitten.py Add data URI support to dnd kitten parse_uri_list 2026-05-18 07:54:57 +00:00
file_transmission.py
FiraCode-Medium.otf
fonts.py fonts: make the color emoji regression test environment-independent 2026-06-14 21:00:12 +05:30
glfw.py
gr.py
GraphemeBreakTest.json
graphics.py Preferentially evict transient images before non-transient ones under storage pressure 2026-06-19 06:48:39 +00:00
iosevka-regular.ttf
keys.py Preserve copy_or_noop passthrough 2026-05-20 11:15:49 +05:00
layout.py Add tests for splits layout serialization 2026-06-10 07:41:02 +05:30
LiberationMono-Regular.ttf
main.py
mouse.py
multicell.py
notifications.py
open_actions.py
options.py
panels.py
parser.py graphics: make N a transient usage-hints bitmask 2026-06-19 13:22:01 +09:00
screen.py fix(erase_last_command): erase the most recent command even empty output 2026-06-28 11:17:01 -03:00
search_query_parser.py
shell_integration.py
shm.py
ssh.py Avoid shell quoting in ssh login fallback 2026-05-19 23:14:08 +05:00
tab_bar.py
tui.py
twemoji_smiley-cff2_colr_1.otf
utmp.py