Window: calculate m_rows

This commit is contained in:
Josh Holtrop 2016-07-29 21:07:10 -04:00
parent 862b414c1d
commit d043137099
2 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,7 @@ void Window::resize()
m_columns = m_width / m_font.get_advance();
if (m_columns < 1)
m_columns = 1;
m_rows = (m_height + m_font.get_line_height() - 1) / m_font.get_line_height();
}
void Window::redraw()

View File

@ -31,6 +31,7 @@ protected:
Font m_font;
int m_columns;
int m_rows;
std::shared_ptr<Buffer> m_buffer;