summaryrefslogtreecommitdiff
path: root/core/normal.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/normal.zig')
-rw-r--r--core/normal.zig10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/normal.zig b/core/normal.zig
index e1af647d..2579fab6 100644
--- a/core/normal.zig
+++ b/core/normal.zig
@@ -23,6 +23,7 @@ const Pardes = pardes.Pardes;
const Macro = pardes.Macro;
const Editor = @import("Editor.zig");
const Prompt = @import("Prompt.zig");
+const Command = @import("Command.zig");
fn isPrefix(key: Key, cp: u21) bool {
return key.cp == cp and !key.ctrl and !key.alt;
@@ -1379,12 +1380,15 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error!
v.prefix = .leader;
v.leader_n = 0;
},
- // `:` is the one key a tag and a body do not share: it moves the
- // keyboard between them.
+ // `:` is the one key a tag and a body do not share: from a body it
+ // opens the command line in its tag (Command.zig), whose `:` on
+ // the empty field gives the keyboard to the tag's text; from there
+ // it comes back.
.command_line => switch (t.what) {
.tag => pane.focus = .body,
.column, .workspace => tagline.exitHeader(p),
- .body, .input => tagline.enterTag(p, pane),
+ .body => Command.open(p, pane),
+ .input => tagline.enterTag(p, pane),
},
inline .pipe_selection, .pipe_selection_to, .insert_output, .append_output, .keep_pipe => |role| {
const how: modal.Normal.PipeBehavior = switch (role) {