diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-27 18:26:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-27 18:26:03 +0100 |
commit | f6782732ab4acd02211923fbdccb457dacaf277e (patch) | |
tree | 4626f91aa4b1ca65a1867b99a5e328995b5b389a /src/option.c | |
parent | 122dea70073d140aa89212d344c3f62bd3b5b3fa (diff) |
patch 9.0.0096: flag "new_value_alloced" is always truev9.0.0096
Problem: Flag "new_value_alloced" is always true.
Solution: Remove "new_value_alloced". (closes #10792)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/option.c b/src/option.c index 8286713cba..2a5c9144ac 100644 --- a/src/option.c +++ b/src/option.c @@ -1716,8 +1716,6 @@ do_set( #endif unsigned newlen; int comma; - int new_value_alloced; // new string option - // was allocated // When using ":set opt=val" for a global option // with a local value the local value will be @@ -1785,13 +1783,11 @@ do_set( s = newval; newval = vim_strsave(s); } - new_value_alloced = TRUE; } else if (nextchar == '<') // set to global val { newval = vim_strsave(*(char_u **)get_varp_scope( &(options[opt_idx]), OPT_GLOBAL)); - new_value_alloced = TRUE; } else { @@ -2060,7 +2056,6 @@ do_set( if (save_arg != NULL) // number for 'whichwrap' arg = save_arg; - new_value_alloced = TRUE; } /* @@ -2109,8 +2104,7 @@ do_set( // 'syntax' or 'filetype' autocommands may be // triggered that can cause havoc. errmsg = did_set_string_option( - opt_idx, (char_u **)varp, - new_value_alloced, oldval, errbuf, + opt_idx, (char_u **)varp, oldval, errbuf, opt_flags, &value_checked); secure = secure_saved; |