diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 86dcb97f..7b359f0d 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4151,19 +4151,20 @@ pub const Pardes = struct { const text = p.flatSurface(pane, pl) catch return; const lines = pl.lines; - // Esc: exit select mode / drop pending prefixes + count. The - // selection itself SURVIVES (helix; `;` collapses it) — motions - // replace it anyway. A buffer the table marks `dismiss` (every output - // buffer today) instead takes Esc as "never mind" and closes: Esc IS - // Del, the same builtin its tag offers. + // Esc: the fast document<->terminal hop, running the SAME Toggleterm + // builtin `SPC w t` does. Clear the normal-mode residue it used to + // cancel first: select mode and pending prefixes/count end here, while + // the selection itself SURVIVES (helix; `;` collapses it). Scoped Esc + // meanings (leader/tag/topbar/search cancel, insert -> normal, raw tty + // forwarding) are intercepted in handleKey before this body-normal + // handler and therefore stay unchanged. if (hit(key, config.escape)) { - if (pane.file) |f| if (output_pane.fileTraits(f.output).dismiss) return p.runBuiltin(.Del, p.active, "", null); pane.select = false; pane.pending = 0; pane.pending2 = 0; pane.pending_ch = 0; pane.count = 0; - return; + return p.runBuiltin(.Toggleterm, p.active, "", null); } // count prefix: digits accumulate while no prefix op is in flight // (`0` stays line-start until a count begins) |
