Do not redraw screen on cursor move if the cursor didn't actually move

This commit is contained in:
Josh Holtrop 2016-09-06 21:18:14 -04:00
parent 86246385d4
commit a68ccb52e4

View File

@ -250,26 +250,26 @@ void Window::handle_key(uint32_t scancode, uint32_t mod)
void Window::cursor_left()
{
m_cursor->go_left(1);
redraw();
if (m_cursor->go_left(1))
redraw();
}
void Window::cursor_right()
{
m_cursor->go_right(1);
redraw();
if (m_cursor->go_right(1))
redraw();
}
void Window::cursor_up()
{
m_cursor->go_up(1, m_cursor->column);
redraw();
if (m_cursor->go_up(1, m_cursor->column))
redraw();
}
void Window::cursor_down()
{
m_cursor->go_down(1, m_cursor->column);
redraw();
if (m_cursor->go_down(1, m_cursor->column))
redraw();
}
void Window::scroll_down()