comparison src/edit.c @ 1073:ec7a570696ac v7.0.199

updated for version 7.0-199
author vimboss
date Tue, 20 Feb 2007 02:31:20 +0000
parents d763e7d7e938
children a112fdce9ebd
comparison
equal deleted inserted replaced
1072:25154b22dc96 1073:ec7a570696ac
3446 } 3446 }
3447 #endif 3447 #endif
3448 } 3448 }
3449 else 3449 else
3450 { 3450 {
3451 int prev_col = curwin->w_cursor.col;
3452
3451 /* put the cursor on the last char, for 'tw' formatting */ 3453 /* put the cursor on the last char, for 'tw' formatting */
3452 curwin->w_cursor.col--; 3454 if (prev_col > 0)
3455 dec_cursor();
3453 if (stop_arrow() == OK) 3456 if (stop_arrow() == OK)
3454 insertchar(NUL, 0, -1); 3457 insertchar(NUL, 0, -1);
3455 curwin->w_cursor.col++; 3458 if (prev_col > 0
3459 && ml_get_curline()[curwin->w_cursor.col] != NUL)
3460 inc_cursor();
3456 } 3461 }
3457 3462
3458 auto_format(FALSE, TRUE); 3463 auto_format(FALSE, TRUE);
3459 3464
3460 /* If the popup menu is displayed pressing CTRL-Y means accepting 3465 /* If the popup menu is displayed pressing CTRL-Y means accepting