summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-02 00:58:20 -0300
committerGabriel Schneider <[email protected]>2026-10-02 00:58:20 -0300
commit39d4a7c38b12f907d8ba6c08bb14600b503a13d7 (patch)
tree7ab29d0a3ebe12958019ef46d58e68506d91d615 /src/exec.zig
parent6637d8df988f8cff9d054c39d3781f4a1ede3b8e (diff)
downloadpardes-39d4a7c38b12f907d8ba6c08bb14600b503a13d7.tar.gz
pardes-39d4a7c38b12f907d8ba6c08bb14600b503a13d7.zip
Get of a file not there, or of a directory, says so before asking about unsaved edits; the init file saved in a pane logs a bad line as err - init file line N, as startup does, its commands still not run again
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/exec.zig b/src/exec.zig
index a5b6e506..2a6bd55c 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -1021,7 +1021,9 @@ fn applyInitText(p: *Pardes, text: []const u8, settings_only: bool) void {
// (`#ff0000`).
if (word.len == 0 or isComment(word)) continue;
const setting = config.Runtime.find(word[0 .. std.mem.indexOfAny(u8, word, " \t") orelse word.len]);
- if (settings_only and setting == null) continue;
+ // Saved in a pane, its settings run again and its commands do not:
+ // a word that is neither (a typo) is still said, as at startup.
+ if (settings_only and setting == null and std.meta.stringToEnum(Builtin, word[0 .. std.mem.indexOfAny(u8, word, " \t+") orelse word.len]) != null) continue;
// One init file serves the window and the terminal: a setting only
// the other has (Font, GripWidth in a terminal) is no failure here.
if (setting) |s| if (!s.enabled(builtins.capabilities)) continue;