diff --git a/tabby-terminal/src/api/baseTerminalTab.component.ts b/tabby-terminal/src/api/baseTerminalTab.component.ts index f6a5a619..dcea967d 100644 --- a/tabby-terminal/src/api/baseTerminalTab.component.ts +++ b/tabby-terminal/src/api/baseTerminalTab.component.ts @@ -212,6 +212,11 @@ export class BaseTerminalTabComponent

extends Bas this.showSearchPanel = true setImmediate(() => { const input = this.element.nativeElement.querySelector('.search-input') + const selectedText = (this.frontend?.getSelection() ?? '').trim() + if (input && selectedText.length) { + input.value = selectedText + } + input?.focus() input?.select() })