Mercurial > vim
comparison src/edit.c @ 10468:251554157361 v8.0.0127
commit https://github.com/vim/vim/commit/73fd4988866c3adc15b5d093efdf5e8cf70d093d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 9 19:36:56 2016 +0100
patch 8.0.0127
Problem: Cancelling completion still inserts text when formatting is done
for 'textwidth'. (lacygoill)
Solution: Don't format when CTRL-E was typed. (Hirohito Higashi,
closes #1312)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 09 Dec 2016 19:45:04 +0100 |
parents | 66f1b5bf3fa6 |
children | 3db97def0f35 |
comparison
equal
deleted
inserted
replaced
10467:99e29924e222 | 10468:251554157361 |
---|---|
3873 | 3873 |
3874 /* put the cursor on the last char, for 'tw' formatting */ | 3874 /* put the cursor on the last char, for 'tw' formatting */ |
3875 if (prev_col > 0) | 3875 if (prev_col > 0) |
3876 dec_cursor(); | 3876 dec_cursor(); |
3877 /* only format when something was inserted */ | 3877 /* only format when something was inserted */ |
3878 if (!arrow_used && !ins_need_undo) | 3878 if (!arrow_used && !ins_need_undo && c != Ctrl_E) |
3879 insertchar(NUL, 0, -1); | 3879 insertchar(NUL, 0, -1); |
3880 if (prev_col > 0 | 3880 if (prev_col > 0 |
3881 && ml_get_curline()[curwin->w_cursor.col] != NUL) | 3881 && ml_get_curline()[curwin->w_cursor.col] != NUL) |
3882 inc_cursor(); | 3882 inc_cursor(); |
3883 } | 3883 } |