fix(mouse): selection not ending on mouse release with copy_on_select set to false (#2086)

This commit is contained in:
Thomas Linford 2023-01-12 18:38:12 +01:00 committed by GitHub
parent 3da1cbf95c
commit 5227909846
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2371,8 +2371,9 @@ impl Tab {
} else {
let relative_position = active_pane.relative_position(position);
if let PaneId::Terminal(_) = active_pane.pid() {
if selecting && copy_on_release {
if selecting {
active_pane.end_selection(&relative_position, client_id);
if copy_on_release {
let selected_text = active_pane.get_selected_text();
active_pane.reset_selection();
@ -2381,7 +2382,9 @@ impl Tab {
.with_context(err_context)?;
}
}
}
} else {
// notify the release event to a plugin pane, should be renamed
active_pane.end_selection(&relative_position, client_id);
}