Skip to content

Commit 2c87288

Browse files
authored
Fix issue with multiline prompts jumping (#405)
1 parent a5c1d26 commit 2c87288

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
@@ -362,7 +362,7 @@ std::string Term::prompt_multiline(const std::string& prompt_string, std::vector
362362
}
363363
render(scr, model, screen.columns());
364364
std::cout << scr.render(1, cursor.row(), term_attached) << std::flush;
365-
if(cursor.row() + scr.columns() - 1 > screen.rows())
365+
if(cursor.row() + scr.rows() - 1 > screen.rows())
366366
{
367367
cursor = Cursor({Row(static_cast<std::uint16_t>(screen.rows() - (scr.columns() - 1))), Column(cursor.column())});
368368
std::cout << scr.render(1, cursor.row(), term_attached) << std::flush;

0 commit comments

Comments
 (0)