diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-08 09:21:15 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-08 09:21:15 +0100 |
| commit | b33fe9f37d6a9c672650df1c61e897f2582ef563 (patch) | |
| tree | 707ee47470715b46523d02a86d6e4304c0d130bc /lua/vis.lua | |
| parent | 6d1d45776b231304b0ff41b5e6098f07931ec44e (diff) | |
| download | vis-b33fe9f37d6a9c672650df1c61e897f2582ef563.tar.gz vis-b33fe9f37d6a9c672650df1c61e897f2582ef563.tar.xz | |
vis-lua: expose init event and use it to set default theme
The init event is emitted immediately after `visrc.lua` has been sourced, but
before any other events have occured, in particular the command line arguments
have not yet been processed.
Close #422
Diffstat (limited to 'lua/vis.lua')
| -rw-r--r-- | lua/vis.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/vis.lua b/lua/vis.lua index c5ab47e..be46b79 100644 --- a/lua/vis.lua +++ b/lua/vis.lua @@ -88,6 +88,7 @@ local events = { FILE_OPEN = "Event::FILE_OPEN", -- see @{file_open} FILE_SAVE_POST = "Event::FILE_SAVE_POST", -- see @{file_save_post} FILE_SAVE_PRE = "Event::FILE_SAVE_PRE", -- see @{file_save_pre} + INIT = "Event::INIT", -- see @{init} QUIT = "Event::QUIT", -- see @{quit} START = "Event::START", -- see @{start} THEME_CHANGE = "Event::THEME_CHANGE", -- see @{theme_change} @@ -102,6 +103,7 @@ events.file_close = function(...) events.emit(events.FILE_CLOSE, ...) end events.file_open = function(...) events.emit(events.FILE_OPEN, ...) end events.file_save_post = function(...) events.emit(events.FILE_SAVE_POST, ...) end events.file_save_pre = function(...) return events.emit(events.FILE_SAVE_PRE, ...) end +events.init = function(...) events.emit(events.INIT, ...) end events.quit = function(...) events.emit(events.QUIT, ...) end events.start = function(...) events.emit(events.START, ...) end events.theme_change = function(...) events.emit(events.THEME_CHANGE, ...) end |
