Revert "Fix #14: better active window detection"

This reverts commit 680cfeb074.
This commit is contained in:
Olivier Roques
2021-05-21 20:19:33 +02:00
parent 88beb047ea
commit 267ecc7cd1
3 changed files with 37 additions and 40 deletions

View File

@@ -1,4 +1,5 @@
local cmd = vim.cmd
local cmd, fn = vim.cmd, vim.fn
local g = vim.g
local fmt = string.format
local M = {}
@@ -23,6 +24,10 @@ 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!')