chores: use stopinsert (#1745)

This commit is contained in:
yetone
2025-03-28 00:17:01 +08:00
committed by GitHub
parent cfc5a78813
commit a9b01e766e
6 changed files with 14 additions and 17 deletions

View File

@@ -450,7 +450,7 @@ function M.unlock_buf(bufnr)
end
function M.lock_buf(bufnr)
vim.cmd("stopinsert")
vim.cmd("noautocmd stopinsert")
vim.bo[bufnr].readonly = true
vim.bo[bufnr].modified = false
vim.bo[bufnr].modifiable = false