Skip to content

Commit a1bcba6

Browse files
author
Your Name
committed
Fix moving down on input in multiline inputs
1 parent 3736902 commit a1bcba6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cecli/tui/widgets/input_area.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,9 @@ def on_key(self, event) -> None:
306306
# If on last line, navigate history
307307
current_row, current_col = self.cursor_location
308308
if current_row == self.document.line_count - 1:
309-
if self.get_cursor_down_location()[1] == len(self.text):
309+
if self.get_cursor_down_location()[1] == sum(
310+
len(s) for s in self.wrapped_document.lines[self.document.line_count - 1]
311+
):
310312
event.stop()
311313
event.prevent_default()
312314
self._history_next()

0 commit comments

Comments
 (0)