diff options
Diffstat (limited to 'core/normal.zig')
| -rw-r--r-- | core/normal.zig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/normal.zig b/core/normal.zig index 1f7ce1a7..981a3f3b 100644 --- a/core/normal.zig +++ b/core/normal.zig @@ -1094,6 +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; + // 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); }, @@ -1379,6 +1392,8 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error! return look.lookWalk(p, if (a.role == .search_next) 1 else -1, false) else if (t.what == .body and pane.file != null and pane.places.answersN(p, pane)) return pane.places.step(p, pane, a.role == .search_next, a.count, t.select) + else if (t.what == .body and panes.Pick.walkList(p, v.active, a.role == .search_next)) + return else return searchStep(p.editor(), t, text, a.role == .search_next, a.count), .goto_word => return startJump(p, pane, t), |
