fix BufferPane::rows_in_line_with_iterator_offset() comparing to reference iterator
This commit is contained in:
parent
9733d577a7
commit
83d4a86e4b
@ -65,13 +65,16 @@ int BufferPane::rows_in_line_with_iterator_offset(const Buffer::Iterator & start
|
||||
uint32_t code_point = *i;
|
||||
if ((code_point == '\n') || (!i.valid()))
|
||||
{
|
||||
if (screen_column == m_columns)
|
||||
if (i == reference)
|
||||
{
|
||||
*iterator_row_offset = rows;
|
||||
}
|
||||
else
|
||||
{
|
||||
*iterator_row_offset = rows - 1;
|
||||
if (screen_column == m_columns)
|
||||
{
|
||||
*iterator_row_offset = rows;
|
||||
}
|
||||
else
|
||||
{
|
||||
*iterator_row_offset = rows - 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -99,6 +102,10 @@ int BufferPane::rows_in_line_with_iterator_offset(const Buffer::Iterator & start
|
||||
screen_column += c_width;
|
||||
}
|
||||
}
|
||||
if (i == reference)
|
||||
{
|
||||
*iterator_row_offset = rows;
|
||||
}
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user