Mirror of the Vim source from https://github.com/vim/vim
Revision | 2ec8266fa254f9f90fd302df275d2813ae08a8e6 (tree) |
---|---|
Zeit | 2007-04-26 17:54:21 |
Autor | vimboss |
Commiter | vimboss |
updated for version 7.0-225
@@ -14397,7 +14397,8 @@ | ||
14397 | 14397 | if (u_savesub(lnum) == OK && ml_replace(lnum, line, TRUE) == OK) |
14398 | 14398 | { |
14399 | 14399 | changed_bytes(lnum, 0); |
14400 | - check_cursor_col(); | |
14400 | + if (lnum == curwin->w_cursor.lnum) | |
14401 | + check_cursor_col(); | |
14401 | 14402 | rettv->vval.v_number = 0; /* OK */ |
14402 | 14403 | } |
14403 | 14404 | } |
@@ -516,7 +516,14 @@ | ||
516 | 516 | || virtual_active()) |
517 | 517 | curwin->w_cursor.col = len; |
518 | 518 | else |
519 | + { | |
519 | 520 | curwin->w_cursor.col = len - 1; |
521 | +#ifdef FEAT_MBYTE | |
522 | + /* prevent cursor from moving on the trail byte */ | |
523 | + if (has_mbyte) | |
524 | + mb_adjust_cursor(); | |
525 | +#endif | |
526 | + } | |
520 | 527 | } |
521 | 528 | |
522 | 529 | #ifdef FEAT_VIRTUALEDIT |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 225, | |
671 | +/**/ | |
670 | 672 | 224, |
671 | 673 | /**/ |
672 | 674 | 223, |