Merge pull request #8331 from Clem-Fern/fix#8297

This commit is contained in:
Eugene
2023-04-28 18:42:48 +02:00
committed by GitHub

View File

@@ -212,6 +212,11 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
this.showSearchPanel = true this.showSearchPanel = true
setImmediate(() => { setImmediate(() => {
const input = this.element.nativeElement.querySelector('.search-input') const input = this.element.nativeElement.querySelector('.search-input')
const selectedText = (this.frontend?.getSelection() ?? '').trim()
if (input && selectedText.length) {
input.value = selectedText
}
input?.focus() input?.focus()
input?.select() input?.select()
}) })