]> granicus.if.org Git - vim/commitdiff
updated for version 7.0075
authorBram Moolenaar <Bram@vim.org>
Sun, 22 May 2005 22:09:40 +0000 (22:09 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 22 May 2005 22:09:40 +0000 (22:09 +0000)
runtime/doc/pattern.txt
src/globals.h
src/ops.c
src/testdir/test55.in

index ba35a047067783db4ba24c931414da25a54e9936..b99b0d7ab8e21da082b975df0b73a91f9a9f5620 100644 (file)
@@ -1,4 +1,4 @@
-*pattern.txt*   For Vim version 7.0aa.  Last change: 2005 Mar 29
+*pattern.txt*   For Vim version 7.0aa.  Last change: 2005 May 22
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -835,8 +835,8 @@ $   At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
        are halfway a Tab or other character that occupies more than one
        screen character.  {not in Vi}
        WARNING: When inserting or deleting text Vim does not automatically
-       update the matches.  This means Syntax highlighting quickly becomes
-       wrong.
+       update highlighted matches.  This means Syntax highlighting quickly
+       becomes wrong.
        Example, to highlight the all characters after virtual column 72: >
                /\%>72v.*
 <      When 'hlsearch' is set and you move the cursor around and make changes
index bbb0f1a697d5dc2e63e2ce991503e604fad667b1..446717d79d8e48316a0b5cbee58fe5832c88b293 100644 (file)
@@ -1431,6 +1431,10 @@ EXTERN char_u e_intern2[]        INIT(=N_("E685: Internal error: %s"));
 EXTERN char_u e_maxmempat[]    INIT(=N_("E363: pattern uses more memory than 'maxmempattern'"));
 EXTERN char_u e_emptybuf[]     INIT(=N_("E749: empty buffer"));
 
+#ifdef FEAT_EX_EXTRA
+EXTERN char_u e_invalpat[]     INIT(=N_("E682: Invalid search pattern or delimiter"));
+#endif
+
 #ifdef MACOS_X_UNIX
 EXTERN short disallow_gui      INIT(= FALSE);
 #endif
index 94dc39c82ec583f5ce155bdff981dda8b003421e..3b45b2df4ae423cdae577f6f3380fe71f8b01b06 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -783,6 +783,17 @@ get_expr_line()
     vim_free(expr_copy);
     return rv;
 }
+
+/*
+ * Get the '=' register expression itself, without evaluating it.
+ */
+    char_u *
+get_expr_line_src()
+{
+    if (expr_line == NULL)
+       return NULL;
+    return vim_strsave(expr_line);
+}
 #endif /* FEAT_EVAL */
 
 /*
@@ -5588,9 +5599,10 @@ get_reg_type(regname, reglen)
  * Returns NULL for error.
  */
     char_u *
-get_reg_contents(regname, allowexpr)
+get_reg_contents(regname, allowexpr, expr_src)
     int                regname;
-    int                allowexpr;      /* allow "=" register. */
+    int                allowexpr;      /* allow "=" register */
+    int                expr_src;       /* get expression for "=" register */
 {
     long       i;
     char_u     *retval;
@@ -5601,7 +5613,11 @@ get_reg_contents(regname, allowexpr)
     if (regname == '=')
     {
        if (allowexpr)
+       {
+           if (expr_src)
+               return get_expr_line_src();
            return get_expr_line();
+       }
        return NULL;
     }
 
index 46a857b125b338722fb78e283c96ba5ff548094e..e25d6ca717897e806195ad4ba4b4fe16ee8b41fa 100644 (file)
@@ -266,6 +266,15 @@ STARTTEST
 :$put =string(reverse(sort(l)))
 :$put =string(sort(reverse(sort(l))))
 :"
+:" splitting a string to a List
+:$put =string(split('  aa  bb '))
+:$put =string(split('  aa  bb  ', '\W\+', 0))
+:$put =string(split('  aa  bb  ', '\W\+', 1))
+:$put =string(split('  aa  bb  ', '\W', 1))
+:$put =string(split(':aa::bb:', ':', 0))
+:$put =string(split(':aa::bb:', ':', 1))
+:$put =string(split('aa,,bb, cc,', ',\s*', 1))
+:"
 :endfun
 :call Test(1, 2, [3, 4], {5: 6})  " This may take a while
 :"