Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll cursor and page together (neovim-like scrolling) #8015

Merged
merged 13 commits into from
Feb 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add TODO for when inline diagnostics gets merged
AlexanderDickie committed Aug 21, 2023
commit 949cfb98fb72c29ee3f401d41ae3ae6d09c67669
4 changes: 4 additions & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1542,6 +1542,10 @@ pub fn scroll_page_and_cursor(cx: &mut Context, offset: usize, direction: Direct
offset += scrolloff - cursor_pos.row + 1;
}

// TODO: When inline diagnostics gets merged- 1. move_vertically_visual removes
// line annotations/diagnostics so the cursor may jump further than the view.
// 2. If the cursor lands on a complete line of virtual text, the cursor will
// jump a different distance than the view.
let selection = doc.selection(view.id).clone().transform(|range| {
move_vertically_visual(
pascalkuthe marked this conversation as resolved.
Show resolved Hide resolved
doc_text,