home
·
contact
·
privacy
projects
/
ircplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42ea7cc
)
Fix misplaced prompt paste inserts.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 9 Dec 2025 16:47:58 +0000
(17:47 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 9 Dec 2025 16:47:58 +0000
(17:47 +0100)
src/ircplom/tui_base.py
patch
|
blob
|
history
diff --git
a/src/ircplom/tui_base.py
b/src/ircplom/tui_base.py
index 07351095ae9ab5a4c0be8471090d1bd43ececc1e..dbbec0800b6b1c3551d1525c6886222a41a8ad1e 100644
(file)
--- a/
src/ircplom/tui_base.py
+++ b/
src/ircplom/tui_base.py
@@
-564,10
+564,10
@@
class PromptWidget(_ScrollableWidget):
def insert(self, to_insert: str) -> None:
'Insert into prompt input buffer.'
- self._cursor_x += len(to_insert)
- self.input_buffer = (self.input_buffer[:self._cursor_x - 1]
+ self.input_buffer = (_buffer[:self._cursor_x]
+ to_insert
- + self.input_buffer[self._cursor_x - 1:])
+ + self.input_buffer[self._cursor_x:])
+ self._cursor_x += len(to_insert)
self._history_idx_neg = 0
def cmd__backspace(self) -> None: