From 09a16b5f09eaf11d28d8b33cdd6c410c0f40cd5a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 20 Feb 2007 02:31:20 +0000 Subject: updated for version 7.0-199 --- src/edit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/edit.c') diff --git a/src/edit.c b/src/edit.c index 46b496ba4..b0e6f45d1 100644 --- 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); -- cgit v1.2.1