mirror of https://github.com/lapce/lapce.git
Implement ShowHover command to support modal hover keybind (#3158)
Hides the hover popup on any move command.
This commit is contained in:
parent
6fa0f4c4b9
commit
fc40496e51
|
@ -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
|
||||
|
||||
|
|
|
@ -612,6 +612,7 @@ fn run_move_command(
|
|||
count: Option<usize>,
|
||||
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);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue