Merge branch 'main' into dev

This commit is contained in:
Pocco81
2021-07-15 11:28:39 -05:00
+7
View File
@@ -32,7 +32,14 @@ local function actual_save()
-- might use update, but in that case it can't be checked if a file was modified and so it will always
-- print opts["execution_message"]
if (api.nvim_eval([[&modified]]) == 1) then
local first_char_pos = vim.fn.getpos("'[")
local last_char_pos = vim.fn.getpos("']")
cmd("silent! write")
vim.fn.setpos("'[", first_char_pos)
vim.fn.setpos("']", last_char_pos)
if (get_modified() == nil or get_modified() == false) then
set_modified(true)
end