1
0
Fork 0

.config/vis: fix set_title

main
urosm 2024-08-20 03:57:29 +02:00
parent 3fe596568f
commit 7aa7dd1750
1 changed files with 3 additions and 3 deletions

View File

@ -151,11 +151,11 @@ end)
local modified = false local modified = false
local function set_title(title) local function set_title(title)
vis:command('!printf "\\e];vis: '..title..(modified and '[+]' or '')..'\\e"') os.execute('printf "\\e];vis: '..title..(modified and '[+]' or '')..'\\e"')
end end
e.subscribe(e.WIN_OPEN, function(win) e.subscribe(e.WIN_OPEN, function(win)
set_title(win.file.name or "[No Name]") set_title(win.file.name or '[No Name]')
end) end)
e.subscribe(e.FILE_SAVE_POST, function(file) e.subscribe(e.FILE_SAVE_POST, function(file)
@ -166,6 +166,6 @@ end)
e.subscribe(e.WIN_STATUS, function(win) e.subscribe(e.WIN_STATUS, function(win)
if not modified and win.file.modified then if not modified and win.file.modified then
modified = true modified = true
set_title(win.file.name) set_title(win.file.name or '[No Name]')
end end
end) end)