From ce7cf75f1f5f962ab7aa0d3bec95e27553e395db Mon Sep 17 00:00:00 2001 From: Son Pham-Ba Date: Fri, 29 Nov 2024 17:07:25 +0100 Subject: [PATCH] feat: smear_between_buffer also control switch between windows --- README.md | 2 +- lua/smear_cursor/config.lua | 2 +- lua/smear_cursor/events.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 ]],