changeset 33412:ada37b7a4b28

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Mon, 15 Apr 2024 16:39:17 +0200
parents 05f246fa1e06 (current diff) f64d8e86b0fc (diff)
children 4debdac5478a 48c2df4bb207
files libgui/src/main-window.cc
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Mon Apr 15 13:54:22 2024 +0200
+++ b/libgui/src/main-window.cc	Mon Apr 15 16:39:17 2024 +0200
@@ -1211,6 +1211,13 @@
 
            load_path& lp = interp.get_load_path ();
 
+           // Rehashing the load path is only needed when executing new files
+           // in the built-in editor for the first time and the command line
+           // prompt hasn't been displayed yet again since this *new* file has
+           // been saved for the first time.
+           // FIXME: Is there a way to detect here that a file is new?
+           lp.rehash ();
+
            std::string path = info.absolutePath ().toStdString ();
 
            if (lp.contains_file_in_dir (file_path, path))