mirror of
https://github.com/neovim/neovim.git
synced 2026-08-02 21:59:11 +00:00
feat(:restart): v:startreason #40186
Problem:
It's clumsy for scripts to handle a "restart", without custom mappings or
global vars.
Solution:
Introduce `v:startreason`
(cherry picked from commit ae426ee465)
This commit is contained in:
committed by
Olivia Kinnear
parent
a4985ac902
commit
611b4f8237
8
runtime/lua/vim/_meta/vvars.gen.lua
generated
8
runtime/lua/vim/_meta/vvars.gen.lua
generated
@@ -667,6 +667,14 @@ vim.v.shell_error = ...
|
||||
--- @type table[]
|
||||
vim.v.stacktrace = ...
|
||||
|
||||
--- The reason Nvim started. Possible values:
|
||||
--- - "normal" normal startup.
|
||||
--- - "restart" started by `:restart` or `ZR`.
|
||||
---
|
||||
--- Read-only.
|
||||
--- @type string
|
||||
vim.v.startreason = ...
|
||||
|
||||
--- Timestamp (nanoseconds since UNIX epoch) when the Nvim process
|
||||
--- started.
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user