From 4e5ccfa5c7183f8aed74f3c012816b9478a50263 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Nov 2011 11:15:47 +0100 Subject: [PATCH] updated for version 7.3.354 Problem: ":set backspace+=eol" doesn't work when 'backspace' has a backwards compatible value of 2. Solution: Convert the number to a string. (Hirohito Higashi) --- src/option.c | 25 +++++++++++++++++++++++++ src/version.c | 2 ++ 2 files changed, 27 insertions(+) diff --git a/src/option.c b/src/option.c index f76b0f9ee..b8e49d8b1 100644 --- a/src/option.c +++ b/src/option.c @@ -4566,6 +4566,31 @@ do_set(arg, opt_flags) save_arg = arg; 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( + (char_u *)"indent,eol"); + break; + case 2: + *(char_u **)varp = vim_strsave( + (char_u *)"indent,eol,start"); + break; + } + vim_free(oldval); + oldval = *(char_u **)varp; + } /* * Convert 'whichwrap' number to string, for * backwards compatibility with Vim 3.0. diff --git a/src/version.c b/src/version.c index a72be66ee..d3ff17077 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 354, /**/ 353, /**/ -- 2.50.1