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
commit 30b51e45bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,6 +212,11 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> 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()
})