.config/vis: fix set_title
parent
3fe596568f
commit
7aa7dd1750
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue