Forgot to handle suspend/resume in example code for setting uservar in nvim

This commit is contained in:
Kovid Goyal 2024-03-26 22:04:08 +05:30
parent 5d5f3ff1b5
commit e5a7554c30
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -210,14 +210,14 @@ In order to make this work, you need to configure your editor as show below:
.. code-block:: lua
vim.api.nvim_create_autocmd({ "VimEnter" }, {
vim.api.nvim_create_autocmd({ "VimEnter", "VimResume" }, {
group = vim.api.nvim_create_augroup("KittySetVarVimEnter", { clear = true }),
callback = function()
io.stdout:write("\x1b]1337;SetUserVar=in_editor=MQo\007")
end,
})
vim.api.nvim_create_autocmd({ "VimLeave" }, {
vim.api.nvim_create_autocmd({ "VimLeave", "VimSuspend" }, {
group = vim.api.nvim_create_augroup("KittyUnsetVarVimLeave", { clear = true }),
callback = function()
io.stdout:write("\x1b]1337;SetUserVar=in_editor\007")