📝 Docs(scrolling): add a simple note making it easy for users to change the behavior of smart-scroll

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.
This commit is contained in:
2025-03-18 22:38:00 -04:00
parent 1ea8611dbc
commit b8aeb1a911
+4
View File
@@ -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