diff --git a/README.md b/README.md index 7396910..b7e36f5 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ return { -- Background color. Defaults to Normal GUI background color if not set. normal_bg = "#282828", - -- Smear cursor when switching buffers. + -- Smear cursor when switching buffers or windows. smear_between_buffers = true, -- Smear cursor when moving within line or to neighbor lines. diff --git a/lua/smear_cursor/config.lua b/lua/smear_cursor/config.lua index 6de4fee..b3e7c29 100644 --- a/lua/smear_cursor/config.lua +++ b/lua/smear_cursor/config.lua @@ -2,7 +2,7 @@ local M = {} -- General configuration ------------------------------------------------------- --- Smear cursor when switching buffers +-- Smear cursor when switching buffers or windows M.smear_between_buffers = true -- Smear cursor when moving within line or to neighbor lines diff --git a/lua/smear_cursor/events.lua b/lua/smear_cursor/events.lua index 25cc2a4..28bffef 100644 --- a/lua/smear_cursor/events.lua +++ b/lua/smear_cursor/events.lua @@ -38,7 +38,7 @@ M.listen = function() autocmd CursorMoved,CursorMovedI * lua require("smear_cursor.color").update_color_at_cursor() autocmd CursorMoved * lua require("smear_cursor.events").move_cursor() autocmd CursorMovedI,WinScrolled * lua require("smear_cursor.events").jump_cursor() - autocmd BufLeave * lua require("smear_cursor.events").flag_switching_buffer() + autocmd BufLeave,WinLeave * lua require("smear_cursor.events").flag_switching_buffer() autocmd ColorScheme * lua require("smear_cursor.color").clear_cache() augroup END ]],