From b8aeb1a9110a03c363b0a4aecacc35ad6e5ad255 Mon Sep 17 00:00:00 2001 From: rootiest Date: Tue, 18 Mar 2025 22:38:00 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Docs(scrolling):=20add=20a=20sim?= =?UTF-8?q?ple=20note=20making=20it=20easy=20for=20users=20to=20change=20t?= =?UTF-8?q?he=20behavior=20of=20smart-scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds one line that can be uncommented to prevent the smart-scroll function from remembering the previous count. Well, it still remembers it, but it won't use it. --- lua/config/overrides.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/config/overrides.lua b/lua/config/overrides.lua index abd40fd..113e04a 100644 --- a/lua/config/overrides.lua +++ b/lua/config/overrides.lua @@ -124,6 +124,10 @@ local function scroll(direction) local count = vim.v.count > 0 and vim.v.count or last_scroll_count -- Remember the count for next time last_scroll_count = count + + -- To remove the memory feature, uncomment the following line + -- count = vim.v.count > 0 and vim.v.count or 1 -- Use current count or default to 1 + -- Calculate the number of lines in a half-screen local half_screen = math.floor(vim.api.nvim_win_get_height(0) / 2) -- Generate the key sequence