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 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
e.subscribe(e.WIN_OPEN, function(win)
set_title(win.file.name or "[No Name]")
set_title(win.file.name or '[No Name]')
end)
e.subscribe(e.FILE_SAVE_POST, function(file)
@ -166,6 +166,6 @@ end)
e.subscribe(e.WIN_STATUS, function(win)
if not modified and win.file.modified then
modified = true
set_title(win.file.name)
set_title(win.file.name or '[No Name]')
end
end)