Skip to content

Commit 909c88c

Browse files
committed
updated for version 7.4.098
Problem: When using ":'<,'>del" errors may be given for the visual line numbers being out of range. Solution: Reset Visual mode in ":del". (Lech Lorens)
1 parent 7272b4d commit 909c88c

File tree

10 files changed

+54
-7
lines changed

10 files changed

+54
-7
lines changed

src/ex_docmd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8570,6 +8570,11 @@ ex_operators(eap)
85708570
beginline(BL_SOL | BL_FIX);
85718571
}
85728572

8573+
#if defined(FEAT_VISUAL)
8574+
if (VIsual_active)
8575+
end_visual_mode();
8576+
#endif
8577+
85738578
switch (eap->cmdidx)
85748579
{
85758580
case CMD_delete:

src/testdir/Make_amiga.mak

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
3434
test81.out test82.out test83.out test84.out test88.out \
3535
test89.out test90.out test91.out test92.out test93.out \
3636
test94.out test95.out test96.out test97.out test98.out \
37-
test99.out test100.out test101.out test102.out
37+
test99.out test100.out test101.out test102.out test103.out
3838

3939
.SUFFIXES: .in .out
4040

@@ -153,3 +153,4 @@ test99.out: test99.in
153153
test100.out: test100.in
154154
test101.out: test101.in
155155
test102.out: test102.in
156+
test103.out: test103.in

src/testdir/Make_dos.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
3333
test84.out test85.out test86.out test87.out test88.out \
3434
test89.out test90.out test91.out test92.out test93.out \
3535
test94.out test95.out test96.out test98.out test99.out \
36-
test100.out test101.out test102.out
36+
test100.out test101.out test102.out test103.out
3737

3838
SCRIPTS32 = test50.out test70.out
3939

src/testdir/Make_ming.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
5353
test84.out test85.out test86.out test87.out test88.out \
5454
test89.out test90.out test91.out test92.out test93.out \
5555
test94.out test95.out test96.out test98.out test99.out \
56-
test100out test101.out test102.out
56+
test100out test101.out test102.out test103.out
5757

5858
SCRIPTS32 = test50.out test70.out
5959

src/testdir/Make_os2.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
3535
test81.out test82.out test83.out test84.out test88.out \
3636
test89.out test90.out test91.out test92.out test93.out \
3737
test94.out test95.out test96.out test98.out test99.out \
38-
test100.out test101.out test102.out
38+
test100.out test101.out test102.out test103.out
3939

4040
.SUFFIXES: .in .out
4141

src/testdir/Make_vms.mms

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Authors: Zoltan Arpadffy, <[email protected]>
55
# Sandor Kopanyi, <[email protected]>
66
#
7-
# Last change: 2013 Nov 12
7+
# Last change: 2013 Nov 21
88
#
99
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
1010
# Edit the lines in the Configuration section below to select.
@@ -79,7 +79,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
7979
test82.out test83.out test84.out test88.out test89.out \
8080
test90.out test91.out test92.out test93.out test94.out \
8181
test95.out test96.out test97.out test98.out test99.out \
82-
test100.out test101.out test102.out
82+
test100.out test101.out test102.out test103.out
8383

8484
# Known problems:
8585
# Test 30: a problem around mac format - unknown reason

src/testdir/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
3030
test84.out test85.out test86.out test87.out test88.out \
3131
test89.out test90.out test91.out test92.out test93.out \
3232
test94.out test95.out test96.out test97.out test98.out \
33-
test99.out test100.out test101.out test102.out
33+
test99.out test100.out test101.out test102.out test103.out
3434

3535
SCRIPTS_GUI = test16.out
3636

src/testdir/test103.in

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Test for visual mode not being reset causing E315 error.
2+
STARTTEST
3+
:so small.vim
4+
:enew
5+
:let g:msg="Everything's fine."
6+
:function! TriggerTheProblem()
7+
: " At this point there is no visual selection because :call reset it.
8+
: " Let's restore the selection:
9+
: normal gv
10+
: '<,'>del _
11+
: try
12+
: exe "normal \<Esc>"
13+
: catch /^Vim\%((\a\+)\)\=:E315/
14+
: echom 'Snap! E315 error!'
15+
: let g:msg='Snap! E315 error!'
16+
: endtry
17+
:endfunction
18+
:enew
19+
:setl buftype=nofile
20+
:call append(line('$'), 'Delete this line.')
21+
:"
22+
:"
23+
:" NOTE: this has to be done by a call to a function because executing :del the
24+
:" ex-way will require the colon operator which resets the visual mode thus
25+
:" preventing the problem:
26+
:"
27+
GV:call TriggerTheProblem()
28+
:%del _
29+
:call append(line('$'), g:msg)
30+
:w! test.out
31+
:brewind
32+
ENDTEST
33+
34+
STARTTEST
35+
:qa!
36+
ENDTEST
37+

src/testdir/test103.ok

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Everything's fine.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
98,
741743
/**/
742744
97,
743745
/**/

0 commit comments

Comments
 (0)