fix row count for empty rows
This commit is contained in:
parent
252f4121f3
commit
b40a5e243b
@ -74,7 +74,7 @@ void BufferPane::walk_line(const Buffer::Iterator & start_of_line, std::function
|
||||
|
||||
int BufferPane::rows_in_line(const Buffer::Iterator & start_of_line)
|
||||
{
|
||||
int saved_row_offset;
|
||||
int saved_row_offset = 0;
|
||||
walk_line(start_of_line, [&saved_row_offset](int row_offset, int screen_column, int virtual_column, int character_width, const Buffer::Iterator & i) {
|
||||
uint32_t code_point = *i;
|
||||
if ((code_point != '\n') && (code_point != 0xFFFFFFFFu))
|
||||
@ -87,7 +87,7 @@ int BufferPane::rows_in_line(const Buffer::Iterator & start_of_line)
|
||||
|
||||
int BufferPane::rows_in_line_with_iterator_offset(const Buffer::Iterator & start_of_line, const Buffer::Iterator & reference, int * iterator_row_offset)
|
||||
{
|
||||
int saved_row_offset;
|
||||
int saved_row_offset = 0;
|
||||
walk_line(start_of_line, [&saved_row_offset, &reference, &iterator_row_offset](int row_offset, int screen_column, int virtual_column, int character_width, const Buffer::Iterator & i) {
|
||||
uint32_t code_point = *i;
|
||||
if (i == reference)
|
||||
|
Loading…
x
Reference in New Issue
Block a user