mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-18 14:04:17 +08:00
Merge pull request #8331 from Clem-Fern/fix#8297
This commit is contained in:
commit
30b51e45bc
@ -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()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user