Browse code

rehelper: fix problem when there are no editors running and a selection is done

Dario Rodriguez authored on 20/01/2024 11:16:45
Showing 1 changed files
... ...
@@ -61,7 +61,10 @@ proc selectionrequest { offset maxchars } {
61 61
 proc checkselection { curselection } {
62 62
         global env
63 63
         set socketsdir /tmp/.re_$env(USER)
64
-        set filenames [glob -tails -directory $socketsdir ) *]
64
+	set filenames [list]
65
+	catch {
66
+	        set filenames [glob -tails -directory $socketsdir ) *]
67
+	}
65 68
         foreach f $filenames {
66 69
                 set index -1
67 70
                 set flen [string length $f]