Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 8 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
Commits on Feb 26, 2013
@brammool brammool updated for version 7.3.840
Problem:    "\@<!" in regexp does not work correctly with multi-byte
	    characters, especially cp932.
Solution:   Move column to start of multi-byte character. (Yasuhiro Matsumoto)
f33715c
@brammool brammool Added tag v7-3-840 for changeset 1778d51fcbc3 36f8f31
@brammool brammool updated for version 7.3.841
Problem:    When a "cond ? one : two" expression has a subscript it is not
	    parsed correctly. (Andy Wokula)
Solution:   Handle a subscript also when the type is unknown. (Christian
	    Brabandt)
a2be532
@brammool brammool Added tag v7-3-841 for changeset b40e6a47ee53 8980ad6
@brammool brammool updated for version 7.3.842
Problem:    Compiler warning for signed/unsigned pointer.
Solution:   Add type cast. (Christian Brabandt)
4a32311
@brammool brammool Added tag v7-3-842 for changeset 78321dcaa8e2 9c46a37
@brammool brammool updated for version 7.3.843
Problem:    Missing test file changes.
Solution:   Change the tests.
742cf6c
@brammool brammool Added tag v7-3-843 for changeset f4960ddda07c 04f440c
Showing with 69 additions and 4 deletions.
  1. +4 −0 .hgtags
  2. +10 −0 src/eval.c
  3. +7 −0 src/regexp.c
  4. +8 −3 src/testdir/test49.ok
  5. +32 −1 src/testdir/test49.vim
  6. +8 −0 src/version.c
View
4 .hgtags
@@ -2176,3 +2176,7 @@ ff193256398a81a520b44c67d661eee36c64ee95 v7-3-836
14698f63de8db5b034939aa66b7076ab76bcd529 v7-3-837
1c819b05529cbbc39982513271499e0217382124 v7-3-838
2030aca407edf6c865114f459bf2d5d79adea390 v7-3-839
+1778d51fcbc37e819c305b860f98c949915d35eb v7-3-840
+b40e6a47ee53789e91b57c04d9ee7328fa9237d5 v7-3-841
+78321dcaa8e263cdf408f7880530b7aea7401a49 v7-3-842
+f4960ddda07ce46a098d9106ac1b22fd0f6d0f0a v7-3-843
View
10 src/eval.c
@@ -5164,6 +5164,16 @@ eval7(arg, rettv, evaluate, want_string)
ret = get_func_tv(s, len, rettv, arg,
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
&len, evaluate, NULL);
+
+ /* If evaluate is FALSE rettv->v_type was not set in
+ * get_func_tv, but it's needed in handle_subscript() to parse
+ * what follows. So set it here. */
+ if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
+ {
+ rettv->vval.v_string = vim_strsave((char_u *)"");
+ rettv->v_type = VAR_FUNC;
+ }
+
/* Stop the expression evaluation when immediately
* aborting on error, or when an interrupt occurred or
* an exception was thrown but not caught. */
View
7 src/regexp.c
@@ -5449,6 +5449,13 @@ regmatch(scan)
}
}
else
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ rp->rs_un.regsave.rs_u.pos.col -=
+ (*mb_head_off)(regline, regline
+ + rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
+ else
+#endif
--rp->rs_un.regsave.rs_u.pos.col;
}
else
View
11 src/testdir/test49.ok
@@ -87,8 +87,13 @@ Results of test49.vim:
*** Test 85: OK (198689)
--- Test 86: No Crash for vimgrep on BufUnload
*** Test 86: OK (0)
---- Test 87: All tests were run with throwing exceptions on error.
+--- Test 87: 3
+--- Test 87: 5
+--- Test 87: abcdefghijk
+--- Test 87: Successfully executed funcref Add2
+*** Test 87: OK (0)
+--- Test 88: All tests were run with throwing exceptions on error.
The $VIMNOERRTHROW control is not configured.
---- Test 87: All tests were run with throwing exceptions on interrupt.
+--- Test 88: All tests were run with throwing exceptions on interrupt.
The $VIMNOINTTHROW control is not configured.
-*** Test 87: OK (50443995)
+*** Test 88: OK (50443995)
View
33 src/testdir/test49.vim
@@ -9624,7 +9624,38 @@ Xout "No Crash for vimgrep on BufUnload"
Xcheck 0
"-------------------------------------------------------------------------------
-" Test 87: $VIMNOERRTHROW and $VIMNOINTTHROW support {{{1
+" Test 87 using (expr) ? funcref : funcref {{{1
+"
+" Vim needs to correctly parse the funcref and even when it does
+" not execute the funcref, it needs to consume the trailing ()
+"-------------------------------------------------------------------------------
+
+XpathINIT
+
+func Add2(x1, x2)
+ return a:x1 + a:x2
+endfu
+
+func GetStr()
+ return "abcdefghijklmnopqrstuvwxyp"
+endfu
+
+echo function('Add2')(2,3)
+
+Xout 1 ? function('Add2')(1,2) : function('Add2')(2,3)
+Xout 0 ? function('Add2')(1,2) : function('Add2')(2,3)
+" Make sure, GetStr() still works.
+Xout GetStr()[0:10]
+
+
+delfunction GetStr
+delfunction Add2
+Xout "Successfully executed funcref Add2"
+
+Xcheck 0
+
+"-------------------------------------------------------------------------------
+" Test 88: $VIMNOERRTHROW and $VIMNOINTTHROW support {{{1
"
" It is possible to configure Vim for throwing exceptions on error
" or interrupt, controlled by variables $VIMNOERRTHROW and
View
8 src/version.c
@@ -729,6 +729,14 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 843,
+/**/
+ 842,
+/**/
+ 841,
+/**/
+ 840,
+/**/
839,
/**/
838,

No commit comments for this range

Something went wrong with that request. Please try again.