aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_defaults.lua
Commit message (Collapse)AuthorAge
* fix(defaults): wait until VimEnter to set background (#26284)Gregory Anders2023-11-29
| | | | | | | The OptionSet autocommand does not fire until Vim has finished starting, so setting 'background' before the VimEnter event would not fire the OptionSet event. The prior implementation also waited until VimEnter to set 'background', so this was a regression introduced when moving background detection into Lua.
* refactor: use optional base argument of tonumber (#26070)Gregory Anders2023-11-16
|
* fix: only attempt to close timer if not already closing (#26047)Gregory Anders2023-11-14
| | | | | | | | | | | This fixes an error that can occur in certain pathological cases when the autocommand fires at just the right time such that it attempts to close the timer after the timer has already exited, but before the scheduled callback has fired. We now let the timer continue to run even when the autocommand deletes itself to avoid having to repeat the cleanup code multiple times. There is no harm in letting the timer execute if the autocommand does not exist, as the pcall will catch the error.
* refactor: move background color detection into LuaGregory Anders2023-11-13
|
* refactor: move defaults into separate module (#25929)Gregory Anders2023-11-08
Move default mappings and autocommands into a separate module and add comments and docstrings to document each of the defaults.