mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-29 04:11:49 +00:00
If you live in the terminal, kitty is made for you! Cross-platform, fast, feature-rich, GPU based.
https://sw.kovidgoyal.net/kitty/
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. |
||
|---|---|---|
| .github | ||
| 3rdparty | ||
| bypy | ||
| docs | ||
| gen | ||
| glad | ||
| glfw | ||
| kittens | ||
| kitty | ||
| kitty_tests | ||
| logo | ||
| shell-integration | ||
| terminfo | ||
| tools | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| __main__.py | ||
| benchmark.py | ||
| Brewfile | ||
| build-terminfo | ||
| CHANGELOG.rst | ||
| CONTRIBUTING.md | ||
| count-lines-of-code | ||
| dev.sh | ||
| embeds.go | ||
| go.mod | ||
| go.sum | ||
| INSTALL.md | ||
| key_encoding.json | ||
| LICENSE | ||
| Makefile | ||
| publish.py | ||
| pyproject.toml | ||
| README.asciidoc | ||
| rsync-and-build.sh | ||
| SECURITY.md | ||
| session.vim | ||
| setup.py | ||
| shell.nix | ||
| staticcheck.conf | ||
| test.py | ||
| update-on-ox | ||
= kitty - the fast, feature-rich, cross-platform, GPU based terminal If you live in the terminal, *kitty* is made for **you**! See https://sw.kovidgoyal.net/kitty/[the kitty website]. image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"] https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions] To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the https://www.reddit.com/r/KittyTerminal[Reddit community] Packaging status in various repositories: image:https://repology.org/badge/vertical-allrepos/kitty-terminal.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty-terminal/versions"]