1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.05
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0550
Problem: Expression evaluation may repeat an error message. (Jason
Franklin)
Solution: Increment did_emsg and check for the value when giving an error
for the echo command.
Files: src/message.c, src/eval.c, src/testdir/test108.ok
*** ../vim-8.1.0549/src/message.c 2018-10-07 23:16:33.138616197 +0200
--- src/message.c 2018-11-28 20:30:19.215302673 +0100
***************
*** 636,642 ****
if (cause_errthrow(s, severe, &ignore) == TRUE)
{
if (!ignore)
! did_emsg = TRUE;
return TRUE;
}
--- 636,642 ----
if (cause_errthrow(s, severe, &ignore) == TRUE)
{
if (!ignore)
! ++did_emsg;
return TRUE;
}
***************
*** 689,695 ****
beep_flush(); /* also includes flush_buffers() */
else
flush_buffers(FLUSH_MINIMAL); // flush internal buffers
! did_emsg = TRUE; // flag for DoOneCmd()
#ifdef FEAT_EVAL
did_uncaught_emsg = TRUE;
#endif
--- 689,695 ----
beep_flush(); /* also includes flush_buffers() */
else
flush_buffers(FLUSH_MINIMAL); // flush internal buffers
! ++did_emsg; // flag for DoOneCmd()
#ifdef FEAT_EVAL
did_uncaught_emsg = TRUE;
#endif
*** ../vim-8.1.0549/src/eval.c 2018-10-25 13:31:33.829906902 +0200
--- src/eval.c 2018-11-28 20:30:54.619090027 +0100
***************
*** 7999,8004 ****
--- 7999,8005 ----
int needclr = TRUE;
int atstart = TRUE;
char_u numbuf[NUMBUFLEN];
+ int did_emsg_before = did_emsg;
if (eap->skip)
++emsg_skip;
***************
*** 8016,8022 ****
* has been cancelled due to an aborting error, an interrupt, or an
* exception.
*/
! if (!aborting())
EMSG2(_(e_invexpr2), p);
need_clr_eos = FALSE;
break;
--- 8017,8023 ----
* has been cancelled due to an aborting error, an interrupt, or an
* exception.
*/
! if (!aborting() && did_emsg == did_emsg_before)
EMSG2(_(e_invexpr2), p);
need_clr_eos = FALSE;
break;
*** ../vim-8.1.0549/src/testdir/test108.ok 2016-01-16 15:35:46.000000000 +0100
--- src/testdir/test108.ok 2018-11-28 20:37:22.504719732 +0100
***************
*** 28,34 ****
Error detected while processing function Foo[2]..Bar[2]..Bazz:
line 3:
E121: Undefined variable: var3
- E15: Invalid expression: var3
here var3 is defined with "another var":
another var
--- 28,33 ----
***************
*** 36,42 ****
Error detected while processing function Foo[2]..Bar:
line 3:
E121: Undefined variable: var2
- E15: Invalid expression: var2
here var2 is defined with 10:
10
--- 35,40 ----
*** ../vim-8.1.0549/src/version.c 2018-11-26 21:22:03.128367125 +0100
--- src/version.c 2018-11-28 20:38:15.024394567 +0100
***************
*** 794,795 ****
--- 794,797 ----
{ /* Add new patch number below this line */
+ /**/
+ 550,
/**/
--
A programmer's wife asks him: "Please run to the store and pick up a loaf of
bread. If they have eggs, get a dozen". The programmer comes home with 12
loafs of bread.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|