fix(mouse): mouse events not forwarded to plugin panes (#1369)
* fix mouse click and release events not forwarded to plugin panes
This commit is contained in:
parent
77e9dc93f7
commit
bfa4942c5b
1 changed files with 8 additions and 4 deletions
|
|
@ -1549,10 +1549,13 @@ impl Tab {
|
|||
relative_position.line.0 + 1
|
||||
);
|
||||
self.write_to_active_terminal(mouse_event.into_bytes(), client_id);
|
||||
} else if let PaneId::Terminal(_) = pane.pid() {
|
||||
} else {
|
||||
// TODO: rename this method, it is used to forward click events to plugin panes
|
||||
pane.start_selection(&relative_position, client_id);
|
||||
if let PaneId::Terminal(_) = pane.pid() {
|
||||
self.selecting_with_mouse = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
pub fn handle_right_click(&mut self, position: &Position, client_id: ClientId) {
|
||||
|
|
@ -1617,9 +1620,10 @@ impl Tab {
|
|||
.min(active_pane.get_content_rows() as isize);
|
||||
let mouse_event = format!("\u{1b}[<0;{:?};{:?}m", col, line);
|
||||
self.write_to_active_terminal(mouse_event.into_bytes(), client_id);
|
||||
} else if selecting {
|
||||
} else {
|
||||
// TODO: rename this method, it is used to forward release events to plugin panes
|
||||
active_pane.end_selection(&relative_position, client_id);
|
||||
if copy_on_release {
|
||||
if selecting && copy_on_release {
|
||||
let selected_text = active_pane.get_selected_text();
|
||||
active_pane.reset_selection();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue