Skip to content

Commit f0cd015

Browse files
committed
Fix issue with multiline prompts jumping
1 parent 3e1aea9 commit f0cd015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp-terminal/prompt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ std::string Term::prompt_multiline(const std::string& prompt_string, std::vector
356356
}
357357
render(scr, model, screen.columns());
358358
std::cout << scr.render(1, cursor.row(), term_attached) << std::flush;
359-
if(cursor.row() + scr.columns() - 1 > screen.rows())
359+
if(cursor.row() + scr.rows() - 1 > screen.rows())
360360
{
361361
cursor = Cursor({Row(static_cast<std::uint16_t>(screen.rows() - (scr.columns() - 1))), Column(cursor.column())});
362362
std::cout << scr.render(1, cursor.row(), term_attached) << std::flush;

0 commit comments

Comments
 (0)