mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 14:58:18 +00:00
Use one variable for tracking adjustment instead of two
This commit is contained in:
@@ -670,8 +670,8 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
|
|||||||
|
|
||||||
vcol = offset;
|
vcol = offset;
|
||||||
|
|
||||||
#define incr() col++; nudge++; ptr_end += utfc_ptr2len(ptr_end)
|
#define incr() nudge++; ptr_end += utfc_ptr2len(ptr_end)
|
||||||
#define decr() col--; nudge--; ptr_end -= utfc_ptr2len(ptr_end)
|
#define decr() nudge--; ptr_end -= utfc_ptr2len(ptr_end)
|
||||||
|
|
||||||
while (ptr < ptr_end && *ptr != NUL) {
|
while (ptr < ptr_end && *ptr != NUL) {
|
||||||
cwidth = chartabsize(ptr, vcol);
|
cwidth = chartabsize(ptr, vcol);
|
||||||
@@ -712,5 +712,5 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
|
|||||||
ptr += utfc_ptr2len(ptr);
|
ptr += utfc_ptr2len(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return col;
|
return col + nudge;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user