C-l and C-k l repaint the whole terminal

C-l only cleared the status line and C-k l asked for nothing, and the
terminal frame then sent only what ncurses believed had changed, so
output another program wrote to the terminal stayed on screen. Both
now request a full redraw, which the terminal honors with
clearok(curscr); the GUI repaints every frame already.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 15:02:51 -08:00
co-authored by Claude Opus 5.5
parent 435c4d6ec6
commit 4a020df74e
5 changed files with 54 additions and 1 deletions
+3
View File
@@ -1495,6 +1495,8 @@ cmd_quit_now(CommandContext &ctx)
static bool
cmd_refresh(CommandContext &ctx)
{
// C-l: repaint the whole screen, whatever else this cancels.
ctx.editor.RequestFullRedraw();
// C-g is mapped to Refresh and acts as a general cancel key.
// Cancel visual-line (multicursor) mode if active.
if (Buffer *buf = ctx.editor.CurrentBuffer()) {
@@ -5316,6 +5318,7 @@ cmd_reload_buffer(CommandContext &ctx)
}
ctx.editor.SetStatus(std::string("Reloaded ") + filename);
ensure_cursor_visible(ctx.editor, *buf);
ctx.editor.RequestFullRedraw();
return true;
}