diff src/testdir/test_popup.vim @ 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 c1cfdf43560c
children 319bafc99ee8
line wrap: on
line diff
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -464,4 +464,22 @@ func Test_completefunc_with_scratch_buff
   set completeopt&
 endfunc
 
+" <C-E> - select original typed text before the completion started without
+" auto-wrap text.
+func Test_completion_ctrl_e_without_autowrap()
+  new
+  let tw_save=&tw
+  set tw=78
+  let li = [
+        \ '"                                                        zzz',
+        \ '" zzzyyyyyyyyyyyyyyyyyyy']
+  call setline(1, li)
+  0
+  call feedkeys("A\<C-X>\<C-N>\<C-E>\<Esc>", "tx")
+  call assert_equal(li, getline(1, '$'))
+
+  let &tw=tw_save
+  q!
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab