comparison src/normal.c @ 6961:c2b132add309 v7.4.798

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)
author Bram Moolenaar <bram@vim.org>
date Tue, 28 Jul 2015 11:21:32 +0200
parents 1e621b31948b
children a25618cbc68a
comparison
equal deleted inserted replaced
6960:b5cdc4f295ac 6961:c2b132add309
9596 if (has_mbyte) 9596 if (has_mbyte)
9597 mb_adjustpos(curwin->w_buffer, &oap->end); 9597 mb_adjustpos(curwin->w_buffer, &oap->end);
9598 #endif 9598 #endif
9599 9599
9600 getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol); 9600 getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);
9601 getvvcol(curwin, &(oap->end), &start, NULL, &end); 9601
9602 9602 if (!redo_VIsual_busy)
9603 if (start < oap->start_vcol) 9603 {
9604 oap->start_vcol = start; 9604 getvvcol(curwin, &(oap->end), &start, NULL, &end);
9605 if (end > oap->end_vcol) 9605
9606 { 9606 if (start < oap->start_vcol)
9607 if (initial && *p_sel == 'e' && start >= 1 9607 oap->start_vcol = start;
9608 && start - 1 >= oap->end_vcol) 9608 if (end > oap->end_vcol)
9609 oap->end_vcol = start - 1; 9609 {
9610 else 9610 if (initial && *p_sel == 'e' && start >= 1
9611 oap->end_vcol = end; 9611 && start - 1 >= oap->end_vcol)
9612 } 9612 oap->end_vcol = start - 1;
9613 else
9614 oap->end_vcol = end;
9615 }
9616 }
9617
9613 /* if '$' was used, get oap->end_vcol from longest line */ 9618 /* if '$' was used, get oap->end_vcol from longest line */
9614 if (curwin->w_curswant == MAXCOL) 9619 if (curwin->w_curswant == MAXCOL)
9615 { 9620 {
9616 curwin->w_cursor.col = MAXCOL; 9621 curwin->w_cursor.col = MAXCOL;
9617 oap->end_vcol = 0; 9622 oap->end_vcol = 0;