* stylua -> EmmyLuaCodeStyle: config and doc * stylua -> EmmyLuaCodeStyle: CI * stylua -> EmmyLuaCodeStyle: CI * stylua -> EmmyLuaCodeStyle: CI * stylua -> EmmyLuaCodeStyle: CI * stylua -> EmmyLuaCodeStyle: CI * stylua -> EmmyLuaCodeStyle * stylua -> EmmyLuaCodeStyle: call_arg_parentheses = always * stylua -> EmmyLuaCodeStyle * stylua -> EmmyLuaCodeStyle
This commit is contained in:
committed by
GitHub
parent
9650e735ba
commit
1ae1c33ce1
@@ -6,16 +6,14 @@ M._modified = {}
|
||||
---refresh M._modified
|
||||
function M.reload_modified()
|
||||
M._modified = {}
|
||||
local bufs = vim.fn.getbufinfo { bufmodified = 1, buflisted = 1 }
|
||||
local bufs = vim.fn.getbufinfo({ bufmodified = 1, buflisted = 1 })
|
||||
for _, buf in pairs(bufs) do
|
||||
local path = buf.name
|
||||
if path ~= "" then -- not a [No Name] buffer
|
||||
-- mark all the parent as modified as well
|
||||
while
|
||||
M._modified[path] ~= true
|
||||
while M._modified[path] ~= true do
|
||||
-- no need to keep going if already recorded
|
||||
-- This also prevents an infinite loop
|
||||
do
|
||||
M._modified[path] = true
|
||||
path = vim.fn.fnamemodify(path, ":h")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user