Mercurial > vim
changeset 1073:ec7a570696ac v7.0.199
updated for version 7.0-199
author | vimboss |
---|---|
date | Tue, 20 Feb 2007 02:31:20 +0000 |
parents | 25154b22dc96 |
children | a112fdce9ebd |
files | src/edit.c src/version.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/edit.c +++ b/src/edit.c @@ -3448,11 +3448,16 @@ ins_compl_prep(c) } else { + int prev_col = curwin->w_cursor.col; + /* put the cursor on the last char, for 'tw' formatting */ - curwin->w_cursor.col--; + if (prev_col > 0) + dec_cursor(); if (stop_arrow() == OK) insertchar(NUL, 0, -1); - curwin->w_cursor.col++; + if (prev_col > 0 + && ml_get_curline()[curwin->w_cursor.col] != NUL) + inc_cursor(); } auto_format(FALSE, TRUE);