aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/optionstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r--src/nvim/optionstr.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index cf8e6cf641..2382219b55 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -69,8 +69,6 @@ static const char e_backupext_and_patchmode_are_equal[]
= N_("E589: 'backupext' and 'patchmode' are equal");
static const char e_showbreak_contains_unprintable_or_wide_character[]
= N_("E595: 'showbreak' contains unprintable or wide character");
-static const char e_internal_error_shortmess_too_long[]
- = N_("E1336: Internal error: shortmess too long");
static char *(p_ambw_values[]) = { "single", "double", NULL };
static char *(p_bg_values[]) = { "light", "dark", NULL };
@@ -2269,36 +2267,6 @@ int check_ff_value(char *p)
return check_opt_strings(p, p_ff_values, false);
}
-static char shm_buf[SHM_LEN];
-static int set_shm_recursive = 0;
-
-/// Save the actual shortmess Flags and clear them temporarily to avoid that
-/// file messages overwrites any output from the following commands.
-///
-/// Caller must make sure to first call save_clear_shm_value() and then
-/// restore_shm_value() exactly the same number of times.
-void save_clear_shm_value(void)
-{
- if (strlen(p_shm) >= SHM_LEN) {
- iemsg(e_internal_error_shortmess_too_long);
- return;
- }
-
- if (++set_shm_recursive == 1) {
- STRCPY(shm_buf, p_shm);
- set_option_value_give_err("shm", STATIC_CSTR_AS_OPTVAL(""), 0);
- }
-}
-
-/// Restore the shortmess Flags set from the save_clear_shm_value() function.
-void restore_shm_value(void)
-{
- if (--set_shm_recursive == 0) {
- set_option_value_give_err("shm", CSTR_AS_OPTVAL(shm_buf), 0);
- memset(shm_buf, 0, SHM_LEN);
- }
-}
-
static const char e_conflicts_with_value_of_listchars[]
= N_("E834: Conflicts with value of 'listchars'");
static const char e_conflicts_with_value_of_fillchars[]