Fix crash on resize in TerminalUI

This commit is contained in:
Maxime Coste 2019-11-28 20:23:26 +11:00
parent 7e66846172
commit 03563d51aa

View File

@ -85,7 +85,7 @@ void TerminalUI::Window::refresh(bool force)
void TerminalUI::Window::move_cursor(DisplayCoord coord) void TerminalUI::Window::move_cursor(DisplayCoord coord)
{ {
cursor = coord; cursor = {std::min(size.line-1, coord.line), std::min(size.column-1, coord.column)};
} }
void TerminalUI::Window::clear_line() void TerminalUI::Window::clear_line()