From 39d4a7c38b12f907d8ba6c08bb14600b503a13d7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 2 Oct 2026 00:58:20 -0300 Subject: 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 --- src/exec.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/exec.zig') 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; -- cgit v1.3