diff options
author | Dmitry Sharshakov | 2021-09-05 05:50:03 +0000 |
---|---|---|
committer | Dmitry Sharshakov | 2021-09-05 05:50:03 +0000 |
commit | 8a609047c3e0d9586038b04cebb288d62db57a18 (patch) | |
tree | 75cbee04d9f12d3b8f4faab240bf67986f684b3d /helix-term/src/ui | |
parent | 7bdead5b4b79ca81b645eb488a979d85b668f185 (diff) |
Mouse command for editing logpoint
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 20fdd152..b6757ca0 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -1077,6 +1077,7 @@ impl EditorView { kind: MouseEventKind::Up(MouseButton::Right), row, column, + modifiers, .. } => { let result = cxt.editor.tree.views().find_map(|(view, _focus)| { @@ -1090,7 +1091,11 @@ impl EditorView { let doc = &mut cxt.editor.documents[cxt.editor.tree.get(view_id).doc]; if let Ok(pos) = doc.text().try_line_to_char(line) { doc.set_selection(view_id, Selection::point(pos)); - commands::Command::dap_edit_condition.execute(cxt); + if modifiers == crossterm::event::KeyModifiers::ALT { + commands::Command::dap_edit_log.execute(cxt); + } else { + commands::Command::dap_edit_condition.execute(cxt); + } return EventResult::Consumed(None); } |