fix moving cursor screen row down with row-wrapping tab characters
This commit is contained in:
1 parent
79aa91bf49
commit
33377f7668
2 files changed
+35
-1
No files matched your search
@@ -402,14 +402,20 @@ void BufferView::move_forward_to_screen_position(
|
||||
bool allow_eol)
|
||||
{
|
||||
*m_iterator = *line;
|
||||
bool moved_to_target_row = false;
|
||||
for (auto it = horiz_iter(line); it.is_valid(); it++)
|
||||
{
|
||||
if ((allow_eol || (!it.is_eol())) &&
|
||||
if (((!it.is_eol()) || allow_eol) &&
|
||||
((it.row_offset() < target_row_offset) ||
|
||||
(!moved_to_target_row) ||
|
||||
(it.screen_column() <= m_target_screen_column)))
|
||||
{
|
||||
*m_iterator = *it.iterator();
|
||||
m_cursor_row_offset = it.row_offset();
|
||||
if (it.row_offset() == target_row_offset)
|
||||
{
|
||||
moved_to_target_row = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user