mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-28 16:18:35 +00:00
make ctrl-f select the search query
This commit is contained in:
@@ -191,6 +191,20 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
this.logger = this.log.create('baseTerminalTab')
|
||||
this.setTitle(this.translate.instant('Terminal'))
|
||||
|
||||
this.subscribeUntilDestroyed(this.hotkeys.unfilteredHotkey$, async hotkey => {
|
||||
if (!this.hasFocus) {
|
||||
return
|
||||
}
|
||||
if (hotkey === 'search') {
|
||||
this.showSearchPanel = true
|
||||
setImmediate(() => {
|
||||
const input = this.element.nativeElement.querySelector('.search-input')
|
||||
input?.focus()
|
||||
input?.select()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
this.subscribeUntilDestroyed(this.hotkeys.hotkey$, async hotkey => {
|
||||
if (!this.hasFocus) {
|
||||
return
|
||||
@@ -265,14 +279,6 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
}[this.hostApp.platform])
|
||||
})
|
||||
break
|
||||
case 'search':
|
||||
this.showSearchPanel = true
|
||||
setImmediate(() => {
|
||||
const input = this.element.nativeElement.querySelector('.search-input')
|
||||
input?.focus()
|
||||
input?.select()
|
||||
})
|
||||
break
|
||||
case 'pane-focus-all':
|
||||
this.focusAllPanes()
|
||||
break
|
||||
|
Reference in New Issue
Block a user