Fix cursor position overwritten by addstr after loop
This commit is contained in:
parent
18bbb07737
commit
6f20e4b0b9
@ -166,6 +166,7 @@ class HendrikTUI:
|
|||||||
else:
|
else:
|
||||||
show = self.input_line - 1
|
show = self.input_line - 1
|
||||||
|
|
||||||
|
cursor_yx = None
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
idx = show + i
|
idx = show + i
|
||||||
y = iy + 1 + i
|
y = iy + 1 + i
|
||||||
@ -182,8 +183,10 @@ class HendrikTUI:
|
|||||||
except curses.error:
|
except curses.error:
|
||||||
pass
|
pass
|
||||||
if idx == self.input_line and not self.processing:
|
if idx == self.input_line and not self.processing:
|
||||||
col = 4 + min(self.input_col, max_text)
|
cursor_yx = (y, 4 + min(self.input_col, max_text))
|
||||||
stdscr.move(y, col)
|
|
||||||
|
if cursor_yx:
|
||||||
|
stdscr.move(*cursor_yx)
|
||||||
|
|
||||||
# ---- status bar -------------------------------------------------------
|
# ---- status bar -------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user