xP: remember buffer input selections
This commit is contained in:
parent
95aa89ee97
commit
add670212f
@ -242,13 +242,18 @@ rpc.addEventListener('BufferActivate', event => {
|
||||
return
|
||||
|
||||
textarea.focus()
|
||||
if (old !== undefined)
|
||||
if (old !== undefined) {
|
||||
old.input = textarea.value
|
||||
old.inputStart = textarea.selectionStart
|
||||
old.inputEnd = textarea.selectionEnd
|
||||
old.inputDirection = textarea.selectionDirection
|
||||
}
|
||||
|
||||
if (b !== undefined)
|
||||
textarea.value = b.input || ''
|
||||
else
|
||||
textarea.value = ''
|
||||
if (b !== undefined && b.input !== undefined) {
|
||||
textarea.value = b.input
|
||||
textarea.setSelectionRange(b.inputStart, b.inputEnd, b.inputDirection)
|
||||
}
|
||||
})
|
||||
|
||||
rpc.addEventListener('BufferLine', event => {
|
||||
|
Loading…
Reference in New Issue
Block a user