From 9ab3f9d01a8ea4967f5a7e64a3f6c8f350674c18 Mon Sep 17 00:00:00 2001
From: AlexanderDickie
Date: Sun, 18 Feb 2024 23:13:04 +0000
Subject: Scroll cursor and page together (neovim-like scrolling) (#8015)

* neovim like scroll function

* clear line annotations outside of move_vertically/_visual

* add nvim scroll function to commands

* assign nvim-scroll to C-d and C-u (half page scrolls)

* dont remove backspace and space mapping

* move non-softwrap logic to seperate function, call this in nvim-scroll fn

* Revert "move non-softwrap logic to seperate function, call this in nvim-scroll fn"

This reverts commit e4905729c338a2260e6981f1d8fac022897b4191.

* Revert "clear line annotations outside of move_vertically/_visual"

This reverts commit 1df3fefe55afc840d1ab5094b2116d1127fc363f.

* add TODO for when inline diagnostics gets merged

* move nvim-scroll logic into scroll(), dont respect scrolloff

* run cargo fmt

* run cargo clippy

* update documenation for Ctrl-d and Ctrl-u remap---
 helix-term/src/ui/editor.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'helix-term/src/ui')

diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index bb749d2e..a87e6cbc 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1156,7 +1156,7 @@ impl EditorView {
                 }
 
                 let offset = config.scroll_lines.unsigned_abs();
-                commands::scroll(cxt, offset, direction);
+                commands::scroll(cxt, offset, direction, false);
 
                 cxt.editor.tree.focus = current_view;
                 cxt.editor.ensure_cursor_in_view(current_view);
-- 
cgit v1.2.3-70-g09d2