mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 02:51:48 +00:00
refactor(options): memory management
Problem:
Numerous callers have to manually check optval ownership (i.e. whether,
and how, to release) via `is_callback_option`, `option_is_global_local`,
etc. This is fragile, hard to use correctly; and if we introduce another
optval variant in the future, we'll have to redo all of these careful
checks and boilerplate again.
Solution:
Provide a unified system and use it everywhere:
optval_free_owned
optval_is_owned
optval_own
This commit is contained in:
@@ -7741,7 +7741,7 @@ local options = {
|
||||
localoptions options and mappings local to a window or buffer (not
|
||||
global values for local options)
|
||||
options all options and mappings (also global values for local
|
||||
options)
|
||||
options), except Lua functions |option-value-function|.
|
||||
skiprtp exclude 'runtimepath' and 'packpath' from the options
|
||||
resize size of the Vim window: 'lines' and 'columns'
|
||||
sesdir the directory in which the session file is located
|
||||
@@ -10419,7 +10419,8 @@ local options = {
|
||||
folds manually created folds, opened/closed folds and local
|
||||
fold options
|
||||
options options and mappings local to a window or buffer (not
|
||||
global values for local options)
|
||||
global values for local options), except Lua functions
|
||||
|option-value-function|.
|
||||
localoptions same as "options"
|
||||
slash |deprecated| Always enabled. Uses "/" in filenames.
|
||||
unix |deprecated| Always enabled. Uses "\n" line endings.
|
||||
|
||||
Reference in New Issue
Block a user