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