changeset 30051:997cf870a963

edit: Search file in load path more efficiently (bug #61080). * scripts/miscellaneous/edit.m: Use function "file_in_loadpath" which takes advantage of caching when searching for a file in the load path.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 26 Aug 2021 11:07:56 +0200
parents 0a8c6cafd7cc
children 525c85e9f402
files scripts/miscellaneous/edit.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/edit.m	Wed Aug 25 20:16:05 2021 -0700
+++ b/scripts/miscellaneous/edit.m	Thu Aug 26 11:07:56 2021 +0200
@@ -310,7 +310,7 @@
     ## Search the entire path for the 1st instance of a file in the list.
     fileandpath = "";
     for n = 1:numel (filelist)
-      filetoedit = file_in_path (path, filelist{n});
+      filetoedit = file_in_loadpath (filelist{n});
       if (! isempty (filetoedit))
         ## The path is explicitly included.
         fileandpath = filetoedit;