Add mark-clearing behavior to refresh command and related test.

- Updated `Refresh` command to clear the mark when no active prompt, search, or visual-line mode is present.
- Added a new unit test verifying mark-clearing behavior for `Ctrl-G` (mapped to `Refresh`).
- Bumped version to 1.6.3 in `CMakeLists.txt`.
This commit is contained in:
2026-02-14 23:05:44 -08:00
parent 2a6ff2a862
commit 44827fe53f
3 changed files with 28 additions and 1 deletions

View File

@@ -817,6 +817,14 @@ cmd_refresh(CommandContext &ctx)
ctx.editor.SetStatus("Find canceled");
return true;
}
// If nothing else to cancel, treat C-g/refresh as a mark clear (ke behavior).
if (Buffer *buf = ctx.editor.CurrentBuffer()) {
if (buf->MarkSet()) {
buf->ClearMark();
ctx.editor.SetStatus("Mark cleared");
return true;
}
}
// Otherwise just a hint; renderer will redraw
ctx.editor.SetStatus("");
return true;