Skip to content

Instantly share code, notes, and snippets.

@mattn
Created November 30, 2011 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/1407327 to your computer and use it in GitHub Desktop.
Save mattn/1407327 to your computer and use it in GitHub Desktop.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment