fix(scrolling): enhance and simplify scrolling (#3028)

The previous scrolling implementation (#2687) moved the result selection
by one item at a time, which isn't technically scrolling (ie. moving the
view) and feels quite slow.

Let the neovim builtin scrolling do its thing, so using the scroll wheel
feels like scrolling and is functionally scrolling, too. Scrolling does
not move the selection so after scrolling it typically makes sense to
click. Moving the selection with keyboard takes you back to where you
were. This is in line with typical desktop user interfaces.
This commit is contained in:
Hannu Hartikainen
2024-04-02 16:36:54 +03:00
committed by GitHub
parent 1bb28df3cf
commit 4626aaa2bc
2 changed files with 0 additions and 90 deletions

View File

@@ -133,26 +133,6 @@ local mappings = {}
mappings.default_mappings = config.values.default_mappings
or {
i = {
["<ScrollWheelDown>"] = {
actions.mouse_scroll_up,
type = "action",
opts = { expr = true },
},
["<ScrollWheelUp>"] = {
actions.mouse_scroll_down,
type = "action",
opts = { expr = true },
},
["<ScrollWheelLeft>"] = {
actions.mouse_scroll_right,
type = "action",
opts = { expr = true },
},
["<ScrollWheelRight>"] = {
actions.mouse_scroll_left,
type = "action",
opts = { expr = true },
},
["<LeftMouse>"] = {
actions.mouse_click,
type = "action",
@@ -201,26 +181,6 @@ mappings.default_mappings = config.values.default_mappings
["<C-j>"] = actions.nop,
},
n = {
["<ScrollWheelDown>"] = {
actions.mouse_scroll_up,
type = "action",
opts = { expr = true },
},
["<ScrollWheelUp>"] = {
actions.mouse_scroll_down,
type = "action",
opts = { expr = true },
},
["<ScrollWheelLeft>"] = {
actions.mouse_scroll_right,
type = "action",
opts = { expr = true },
},
["<ScrollWheelRight>"] = {
actions.mouse_scroll_left,
type = "action",
opts = { expr = true },
},
["<LeftMouse>"] = {
actions.mouse_click,
type = "action",