Adjust scroll past end height logic

This will work properly with very long lines and soft wrap

Fixes #869.
This commit is contained in:
Steven Clukey
2013-03-07 11:40:02 -05:00
committed by Allan Odgaard
parent d89321c4ba
commit 636c321e46

View File

@@ -362,7 +362,7 @@ namespace ng
}
CGFloat layout_t::width () const { return _margin.left + content_width() + _margin.right; }
CGFloat layout_t::height () const { return _margin.top + content_height() + _margin.bottom + (_scroll_past_end ? std::min(_rows.aggregated()._height, _viewport_size.height) - row_for_offset(_buffer.lines()-1)->key._height * 2 : 0); }
CGFloat layout_t::height () const { return _margin.top + content_height() + _margin.bottom + (_scroll_past_end ? std::min(_rows.aggregated()._height, _viewport_size.height) - default_line_height() * 1.5 : 0); }
// ===================
// = Updating Layout =