vim hml (#7298)
- Add a setting for `vertical_scroll_offset` - Fix H/M/L in vim with scrolloff Release Notes: - Added a settings for `vertical_scroll_offset` - vim: Fix H/M/L with various values of vertical_scroll_offset --------- Co-authored-by: Vbhavsar <vbhavsar@gmail.com> Co-authored-by: fdionisi <code@fdionisi.me>
This commit is contained in:
parent
e1efa7298e
commit
f09da1a1c8
9 changed files with 57 additions and 28 deletions
|
@ -1,4 +1,4 @@
|
|||
use editor::{scroll::VERTICAL_SCROLL_MARGIN, test::editor_test_context::ContextHandle};
|
||||
use editor::test::editor_test_context::ContextHandle;
|
||||
use gpui::{px, size, Context};
|
||||
use indoc::indoc;
|
||||
use settings::SettingsStore;
|
||||
|
@ -155,9 +155,7 @@ impl NeovimBackedTestContext {
|
|||
|
||||
pub async fn set_scroll_height(&mut self, rows: u32) {
|
||||
// match Zed's scrolling behavior
|
||||
self.neovim
|
||||
.set_option(&format!("scrolloff={}", VERTICAL_SCROLL_MARGIN))
|
||||
.await;
|
||||
self.neovim.set_option(&format!("scrolloff={}", 3)).await;
|
||||
// +2 to account for the vim command UI at the bottom.
|
||||
self.neovim.set_option(&format!("lines={}", rows + 2)).await;
|
||||
let (line_height, visible_line_count) = self.editor(|editor, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue