ITADN
71/dance/Issues

Add "preserveScroll" option to select.vertically

#385Openforivall 创建于 2025-07-31
F
forivallcommented
When using `ctrl+u`/`ctrl+d` in helix, unlike kakoune, the scroll position is preserved, such that, if your cursor is at the top of your window, after using ctrl+u, your cursor will still be at the top of your viewport after scrolling up. _(in kakoune, your cursor will be at the bottom of the viewport) (helix does have the same behaviour as kakoune after using pgup/pgdn)_ My current workaround is to use the following bindings: ```json { "key": "ctrl+u", "command": "dance.run", "args": {"commands": [["dance.select.vertically", { "direction": -1, "by": "halfPage", "shift": "jump" }], ["dance.view.line", { "at": "center" }]]}, "when": "editorTextFocus && dance.mode == 'normal' || editorTextFocus && dance.mode == 'select'" }, { "key": "ctrl+d", "command": "dance.run", "args": {"commands": [["dance.select.vertically", { "direction": 1, "by": "halfPage", "shift": "jump" }], ["dance.view.line", { "at": "center" }]]}, "when": "editorTextFocus && dance.mode == 'normal' || editorTextFocus && dance.mode == 'select'" }, ```
0 条评论