annotate src/testdir/test103.in @ 7955:a4de8e834b8f v7.4.1273

commit https://github.com/vim/vim/commit/c5f98ee987ae0c369867cf6cc581c766d3c0226d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 7 00:00:35 2016 +0100 patch 7.4.1273 Problem: assert_false(v:false) still fails. Solution: Fix the typo.
author Christian Brabandt <cb@256bit.org>
date Sun, 07 Feb 2016 00:15:04 +0100
parents 79a8bac614c0
children ae45d497868f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5498
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Test for visual mode not being reset causing E315 error.
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 STARTTEST
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 :so small.vim
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :enew
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :let g:msg="Everything's fine."
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :function! TriggerTheProblem()
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 : " At this point there is no visual selection because :call reset it.
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 : " Let's restore the selection:
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 : normal gv
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 : '<,'>del _
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 : try
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 : exe "normal \<Esc>"
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 : catch /^Vim\%((\a\+)\)\=:E315/
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 : echom 'Snap! E315 error!'
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 : let g:msg='Snap! E315 error!'
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 : endtry
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :endfunction
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :enew
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :setl buftype=nofile
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :call append(line('$'), 'Delete this line.')
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :"
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :"
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :" NOTE: this has to be done by a call to a function because executing :del the
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :" ex-way will require the colon operator which resets the visual mode thus
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :" preventing the problem:
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :"
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 GV:call TriggerTheProblem()
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :%del _
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :call append(line('$'), g:msg)
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :w! test.out
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :brewind
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 ENDTEST
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 STARTTEST
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :qa!
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 ENDTEST
79a8bac614c0 updated for version 7.4.098
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37