summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 06:05:56 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit98ed98178b667e551ff2bcaeb981e70d1f6ccb1f (patch)
treeceaa740ffd8367c81ee8b09827f1464ec366d8c7 /src/look.zig
parent554181b73fd53b898841203066382e4287b83e89 (diff)
downloadpardes-98ed98178b667e551ff2bcaeb981e70d1f6ccb1f.tar.gz
pardes-98ed98178b667e551ff2bcaeb981e70d1f6ccb1f.zip
A word written to a raw terminal's look is listed, as in normal mode
A new Tty is in raw mode, where a right click is its program's, and a look written to it over 9P did nothing for that reason. The look file is no keyboard input: over 9P a plain word is listed in a +Search pane and read back whatever the terminal's key mode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/look.zig b/src/look.zig
index 796eb5bb..8318973b 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -1340,7 +1340,9 @@ pub fn lookAt(p: *Pardes, id: usize, operand: []const u8) void {
if (found != .none) clearNavigationSelection(p, pane);
switch (found) {
.none => {
- if (pane.image != null or pane.body.mode == .tty) return;
+ // A raw terminal's clicks are its program's; a look written over
+ // 9P is no keyboard input, and searches whatever the key mode.
+ if (pane.image != null or (pane.body.mode == .tty and !p.fs.serving)) return;
if (p.settings.look_word == .search and pane.file != null) return lookWord(p, id, pane, trimmed);
const rows = runSearch(p, id, trimmed, .text, .cursor, false) catch |err| {
p.reportError(id, "search", err);