Fix #14: better active window detection
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
local cmd, fn = vim.cmd, vim.fn
|
||||
local g = vim.g
|
||||
local cmd = vim.cmd
|
||||
local fmt = string.format
|
||||
local M = {}
|
||||
|
||||
@@ -24,10 +23,6 @@ function M.echo(hlgroup, msg)
|
||||
cmd('echohl None')
|
||||
end
|
||||
|
||||
function M.is_active()
|
||||
return g.statusline_winid == fn.win_getid()
|
||||
end
|
||||
|
||||
function M.set_cache_autocmds(augroup)
|
||||
cmd(fmt('augroup %s', augroup))
|
||||
cmd('autocmd!')
|
||||
|
||||
Reference in New Issue
Block a user