diff --git a/CHANGELOG.md b/CHANGELOG.md index c54f49cb..3472ce28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - [#2779](https://github.com/lapce/lapce/pull/2779): Fix files detection on fresh git/VCS repository - [#3031](https://github.com/lapce/lapce/pull/3031): Fix find not receiving inputs when clicked - [#3142](https://github.com/lapce/lapce/pull/3142): Fix terminal default profile saving incorrectly +- [#3158](https://github.com/lapce/lapce/pull/3158): Fix ShowHover command for showing hover with keybind ## 0.3.1 diff --git a/lapce-app/src/editor.rs b/lapce-app/src/editor.rs index e9a97567..fb4a727e 100644 --- a/lapce-app/src/editor.rs +++ b/lapce-app/src/editor.rs @@ -612,6 +612,7 @@ fn run_move_command( count: Option, mods: Modifiers, ) -> CommandExecuted { + self.common.hover.active.set(false); if movement.is_jump() && movement != &self.editor.last_movement.get_untracked() { @@ -1046,6 +1047,12 @@ pub fn run_focus_command( FocusCommand::InlineCompletionInvoke => { self.update_inline_completion(InlineCompletionTriggerKind::Invoked); } + FocusCommand::ShowHover => { + let start_offset = self.doc().buffer.with_untracked(|b| { + b.prev_code_boundary(self.cursor().get_untracked().offset()) + }); + self.update_hover(start_offset); + } _ => {} }