diff options
author | Blaž Hrastnik | 2021-03-02 06:44:09 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-02 06:44:09 +0000 |
commit | 8f4ff4c646988c377218c08c851297e68e860c65 (patch) | |
tree | 984f5293b6f0f6e293b3c2c75def00b39b008030 /helix-term/src/commands.rs | |
parent | 32f9a2d1d6fe4955cffffa71bbdfc5a43a6f0c9c (diff) |
editor: We still want to be able to calculate cursor pos.
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 0d07059f..8c46a1cf 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1119,8 +1119,7 @@ pub fn completion(cx: &mut Context) { cx.callback = Some(Box::new( move |compositor: &mut Compositor, editor: &mut Editor| { - let area = tui::layout::Rect::default(); // TODO: unused remove from cursor_position - if let Some(mut pos) = compositor.cursor_position(area, editor) { + if let Some(mut pos) = editor.cursor_position() { pos.row += 1; // shift down by one row menu.set_position(pos); }; @@ -1181,8 +1180,7 @@ pub fn hover(cx: &mut Context) { cx.callback = Some(Box::new( move |compositor: &mut Compositor, editor: &mut Editor| { - let area = tui::layout::Rect::default(); // TODO: unused remove from cursor_position - if let Some(mut pos) = compositor.cursor_position(area, editor) { + if let Some(mut pos) = editor.cursor_position() { pos.row += 1; // shift down by one row popup.set_position(pos); }; |