Skip to content

Commit 555c487

Browse files
authored
fix: use InsertLeave instead of TextChangedI for save (#88)
1 parent f2d9d75 commit 555c487

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/gp/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,8 +1356,8 @@ M.prep_md = function(buf)
13561356
vim.api.nvim_command("setlocal noswapfile")
13571357
-- better text wrapping
13581358
vim.api.nvim_command("setlocal wrap linebreak")
1359-
-- auto save on TextChanged, TextChangedI
1360-
vim.api.nvim_command("autocmd TextChanged,TextChangedI <buffer=" .. buf .. "> silent! write")
1359+
-- auto save on TextChanged, InsertLeave
1360+
vim.api.nvim_command("autocmd TextChanged,InsertLeave <buffer=" .. buf .. "> silent! write")
13611361

13621362
-- register shortcuts local to this buffer
13631363
buf = buf or vim.api.nvim_get_current_buf()

0 commit comments

Comments
 (0)