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;
|
uint32_t code_point = *i;
|
||||||
if ((code_point == '\n') || (!i.valid()))
|
if ((code_point == '\n') || (!i.valid()))
|
||||||
{
|
{
|
||||||
if (screen_column == m_columns)
|
if (i == reference)
|
||||||
{
|
{
|
||||||
*iterator_row_offset = rows;
|
if (screen_column == m_columns)
|
||||||
}
|
{
|
||||||
else
|
*iterator_row_offset = rows;
|
||||||
{
|
}
|
||||||
*iterator_row_offset = rows - 1;
|
else
|
||||||
|
{
|
||||||
|
*iterator_row_offset = rows - 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -99,6 +102,10 @@ int BufferPane::rows_in_line_with_iterator_offset(const Buffer::Iterator & start
|
|||||||
screen_column += c_width;
|
screen_column += c_width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (i == reference)
|
||||||
|
{
|
||||||
|
*iterator_row_offset = rows;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user