From 2e29f8ffebda59aa528c392535b7f1db31be91f8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 24 Nov 2026 21:27:16 -0300 Subject: messages: SPC e acts on the message the notice row leads with, SPC h m is the history newest first, and Esc at rest takes a thing at a time (pick-ui SPEC §10.4, walk UI line C item 5): the Message word (SPC e, quiet: what it does shows) lists an error's places in a +Search under the pane and lands on the first (today's list, walked by the Look walk until agent D's picker lands lists in the pane), the error gone; a question gets the keyboard in its tag (View.answering, item 4); anything else, or nothing, opens the history; the history (Messages, SPC h m) is the log ring newest first, each line its kind's glyph, a live error's places under it, a question's answer logged after it; Esc in normal mode at rest takes a search's tints first (Places.clear), then the warnings and errors, then the extra selections (the primary kept), and only then goes back to the previous pane; tests: Messages.zig 'SPC e on an error that names places lists them under the pane and lands on the first, on a question gives its tag the keyboard, and on anything else opens the history, the newest first', 'Esc at rest takes a search's tints first, then the warnings and errors, and only then goes back'; docs/typ/builtins-tui.json from the registry; tui: core-test, shell-test, pane-test, behaviour-test pass; process-test 0 of 146 failed after the builtins and leader goldens took the Messages word's longer doc line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- core/normal.zig | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'core/normal.zig') diff --git a/core/normal.zig b/core/normal.zig index 7efe0bf6..3dade7a6 100644 --- a/core/normal.zig +++ b/core/normal.zig @@ -1094,8 +1094,19 @@ pub fn textAction(e: Editor, t: *Text, a: modal.Normal.Action) edit.Error!void { if (comptime Editor.lib) return; // typed again by a macro, Esc is only helix's if (e.p.macro.replaying > 0) return; - // The warnings and errors first, then the previous pane. + // At rest a thing at a time (pick-ui SPEC §10.4): a search's + // tints, then the warnings and errors, then the selections + // (the primary kept); with none of them left, the previous pane. + if (e.p.panes[e.p.view().active]) |pane| if (t == &pane.body and (pane.places.pattern.len > 0 or pane.places.hits.items.len > 0)) { + pane.places.clear(e.p.gpa); + e.p.needs_frame = true; + return; + }; if (e.p.messages.retire(&.{ .warn, .@"error" }) > 0) return; + if (t.nsel > 0) { + t.nsel = 0; + return; + } tagline.exitHeader(e.p); // out of a header too, as Shift-Esc return exec.runBuiltin(e.p, .Last, e.p.view().active, "", null); }, -- cgit v1.3