Hi list.

When backspace option is set as number like below,

set backspace=2

Error occur when adding 'eol'.

E474: Invalid argument: backspace+=eol 

Behavior that can be set as number is for backwards compatibility with 
version 5.4 and earlier.
When number is set and add new token, it should replace the value into 
vim6's style.

Below is a patch. Please check and include.
This patch is written by Hirohito Higashi.

https://gist.github.com/1407327

diff -r 379a6398d462 src/option.c
--- a/src/option.c Wed Oct 26 23:48:21 2011 +0200
+++ b/src/option.c Wed Nov 30 09:25:36 2011 +0900
@@ -4567,6 +4567,31 @@
  arg = errbuf;
     }
     /*
+     * Convert 'backspace' number to string, for
+     * adding, prepending and removing string.
+     */
+    else if (varp == (char_u *)&p_bs
+ && VIM_ISDIGIT(**(char_u **)varp))
+    {
+ i = getdigits((char_u **)varp);
+ switch (i)
+ {
+    case 0:
+ *(char_u **)varp = empty_option;
+ break;
+    case 1:
+ *(char_u **)varp =
+    vim_strsave("indent,eol");
+ break;
+    case 2:
+ *(char_u **)varp =
+    vim_strsave("indent,eol,start");
+ break;
+ }
+ vim_free(oldval);
+ oldval = *(char_u **)varp;
+    }
+    /*
      * Convert 'whichwrap' number to string, for
      * backwards compatibility with Vim 3.0.
      * Misuse errbuf[] for the resulting string.

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui