Skip to content

Commit f224aea

Browse files
committed
fix padding_lines calculation
1 parent a7408d1 commit f224aea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/terminal_ui.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ void TerminalUI::draw(const DisplayBuffer& display_buffer,
589589

590590
DisplayAtom padding{String{m_padding_char, m_padding_fill ? dim.column : 1}};
591591

592+
const auto padding_lines = (dim.line + line_offset) - line_index;
592593
while (line_index < dim.line + line_offset)
593594
m_window.draw(line_index++, padding, face);
594595

@@ -602,7 +603,6 @@ void TerminalUI::draw(const DisplayBuffer& display_buffer,
602603
for (const LineCount selection_line : selection_lines)
603604
m_scroll_bar_scratch[(int) scale_to(selection_line, buffer_range, gutter_range)]++;
604605

605-
const auto padding_lines = (dim.line + line_offset) - line_index;
606606
const auto visible_lines = range.end - range.begin + padding_lines;
607607
const auto mark_height = scale_to(visible_lines, buffer_range, gutter_range);
608608

0 commit comments

Comments
 (0)