mirror of
https://github.com/neovim/neovim.git
synced 2025-12-02 23:13:01 +00:00
vim-patch:7.4.798
Problem: Repeating a change in Visual mode does not work as expected.
(Urtica Dioica)
Solution: Make redo in Visual mode work better. (Christian Brabandt)
31b259bf95
This commit is contained in:
@@ -7798,20 +7798,23 @@ static void get_op_vcol(
|
||||
}
|
||||
|
||||
getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);
|
||||
getvvcol(curwin, &(oap->end), &start, NULL, &end);
|
||||
if (!redo_VIsual_busy) {
|
||||
getvvcol(curwin, &(oap->end), &start, NULL, &end);
|
||||
|
||||
if (start < oap->start_vcol) {
|
||||
oap->start_vcol = start;
|
||||
}
|
||||
if (end > oap->end_vcol) {
|
||||
if (initial && *p_sel == 'e'
|
||||
&& start >= 1
|
||||
&& start - 1 >= oap->end_vcol) {
|
||||
oap->end_vcol = start - 1;
|
||||
} else {
|
||||
oap->end_vcol = end;
|
||||
if (start < oap->start_vcol) {
|
||||
oap->start_vcol = start;
|
||||
}
|
||||
if (end > oap->end_vcol) {
|
||||
if (initial && *p_sel == 'e'
|
||||
&& start >= 1
|
||||
&& start - 1 >= oap->end_vcol) {
|
||||
oap->end_vcol = start - 1;
|
||||
} else {
|
||||
oap->end_vcol = end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if '$' was used, get oap->end_vcol from longest line
|
||||
if (curwin->w_curswant == MAXCOL) {
|
||||
curwin->w_cursor.col = MAXCOL;
|
||||
|
||||
Reference in New Issue
Block a user