aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 68b0a525f1..61570a75b1 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -6599,7 +6599,7 @@ void vimrc_found(char_u *fname, char_u *envname)
/// @param[in] name Option name.
///
/// @return True if it was set.
-static bool option_was_set(const char *name)
+bool option_was_set(const char *name)
{
int idx;
@@ -6612,6 +6612,18 @@ static bool option_was_set(const char *name)
return false;
}
+/// Reset the flag indicating option "name" was set.
+///
+/// @param[in] name Option name.
+void reset_option_was_set(const char *name)
+{
+ const int idx = findoption(name);
+
+ if (idx >= 0) {
+ options[idx].flags &= ~P_WAS_SET;
+ }
+}
+
/*
* fill_breakat_flags() -- called when 'breakat' changes value.
*/