History

Focus terminal view on mouse click in terminal

Before, terminal view focused the parent (pane) instead and, if terminal's search bar was open and focused, pane transferred the focus back

Kirill Bulatov committed 3 years ago

Commit 80c779b1 parent 139cbbf1 file · +2 −1Browse files

Unified · Split

crates/terminal_view/src/terminal_element.rs+2−1
@@ -400,7 +400,8 @@ impl TerminalElement { · 399 unmodified lines
400400 region = region
401401 // Start selections
402402 .on_down(MouseButton::Left, move |event, v: &mut TerminalView, cx| {
403− cx.focus_parent();
403+ let terminal_view = cx.handle();
404+ cx.focus(&terminal_view);
404405 v.context_menu.update(cx, |menu, _cx| menu.delay_cancel());
405406 if let Some(conn_handle) = connection.upgrade(cx) {
406407 conn_handle.update(cx, |terminal, cx| {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t