aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-10-25 20:10:40 +0600
committerGitHub <noreply@github.com>2024-10-25 07:10:40 -0700
commitb922b7d6d7889cce863540df7b0da7d512f8a2a1 (patch)
treed1b8fdd604c7ddf3d0d301ddc9beccfff6030f18 /runtime
parent01739d4673eecad0631f874ba279c5c362aa1766 (diff)
downloadrneovim-b922b7d6d7889cce863540df7b0da7d512f8a2a1.tar.gz
rneovim-b922b7d6d7889cce863540df7b0da7d512f8a2a1.tar.bz2
rneovim-b922b7d6d7889cce863540df7b0da7d512f8a2a1.zip
refactor(options)!: use OptVal for option defaults #26691
Problem: We use `void *` for option default values, which is confusing and can cause problems with type-correctness. It also doesn't accomodate for multitype options. On top of that, it also leads to default boolean option values not behaving correctly on big endian systems. Solution: Use `OptVal` for option default values. BREAKING CHANGE: - `:set {option}<` removes the local value for all global-local options instead of just string global-local options. - `:setlocal {option}<` copies the global value to the local value for number and boolean global-local options instead of removing the local value.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/news.txt4
-rw-r--r--runtime/doc/options.txt12
-rw-r--r--runtime/doc/vim_diff.txt6
3 files changed, 9 insertions, 13 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 0ec08ac324..cde98e7593 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -104,6 +104,10 @@ OPTIONS
changes according to related options. It takes care of alignment, 'number',
'relativenumber' and 'signcolumn' set to "number". The now redundant `%r` item
is no longer treated specially for 'statuscolumn'.
+• `:set {option}<` removes the local value for all |global-local| options instead
+ of just string |global-local| options.
+• `:setlocal {option}<` copies the global value to the local value for number
+ and boolean |global-local| options instead of removing the local value.
PLUGINS
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 2b81c408ed..90f7f56ca2 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -306,19 +306,13 @@ created, thus they behave slightly differently:
:se[t] {option}< Set the effective value of {option} to its global
value.
- For string |global-local| options, the local value is
- removed, so that the global value will be used.
+ For |global-local| options, the local value is removed,
+ so that the global value will be used.
For all other options, the global value is copied to
the local value.
:setl[ocal] {option}< Set the effective value of {option} to its global
- value.
- For number and boolean |global-local| options, the
- local value is removed, so that the global value will
- be used.
- For all other options, including string |global-local|
- options, the global value is copied to the local
- value.
+ value by copying the global value to the local value.
Note that the behaviour for |global-local| options is slightly different
between string and number-based options.
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 94c0578872..d20f1a511d 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -339,10 +339,8 @@ Normal commands:
Options:
-Local values for global-local number/boolean options are unset when the option
-is set without a scope (e.g. by using |:set|), similarly to how global-local
-string options work.
-
+- `:set {option}<` removes local value for all |global-local| options.
+- `:setlocal {option}<` copies global value to local value for all options.
- 'autoread' works in the terminal (if it supports "focus" events)
- 'cpoptions' flags: |cpo-_|
- 'diffopt' "linematch" feature