Clean up iv window title
John Smith

John Smith commited on 2023-161 12:47:58
Showing 1 changed files, with 1 additions and 1 deletions.


The title given to iv when displaying an image from a card is no longer
cluttered by terminal-specific control characters.
... ...
@@ -39,7 +39,7 @@ local function imgify(text, basepath, ind, climn, conf, question)
39 39
         if path and #path > 0 then
40 40
             os.execute(string.format(
41 41
                 "/usr/local/bin/iv -t '%s' %s%s &",
42
-                st:gsub("'", "\""):gsub(IMG_PATTERN, ""), basepath, path
42
+                st:gsub("'", "\""):gsub(IMG_PATTERN, ""):gsub("\x1b[^m]+m", ""), basepath, path
43 43
             ))
44 44
         end
45 45
     end
46 46