Skip to content

Commit

Permalink
[listview] add some padding to the line size when computing word-wrap…
Browse files Browse the repository at this point in the history
… to account for decorations
  • Loading branch information
tstack committed Feb 11, 2025
1 parent dcafe5b commit 1bcc301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/listview_curses.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,8 @@ listview_curses::height_for_row(vis_line_t row,
auto retval = 1_vl;

if (this->lv_word_wrap) {
auto len = this->lv_source->listview_size_for_row(*this, row);
// source size plus some padding for decorations
auto len = this->lv_source->listview_size_for_row(*this, row) + 5;

while (len > width) {
len -= width;
Expand Down

0 comments on commit 1bcc301

Please sign in to comment.