diff options
author | 2013-08-31 00:47:12 -0400 | |
---|---|---|
committer | 2013-08-31 00:47:12 -0400 | |
commit | d633a4c74e824113f5d242cb18573fed3015bc27 (patch) | |
tree | 41c05e5b83036493d61e68871dc3b011dd71bf03 /init.lua | |
parent | a54200e99b529d2fbbee6e27fabcb2e8de908c19 (diff) | |
download | textadept-d633a4c74e824113f5d242cb18573fed3015bc27.tar.gz textadept-d633a4c74e824113f5d242cb18573fed3015bc27.zip |
Allow user scripts to handle `BUFFER_NEW` and `VIEW_NEW` events on startup.
A side effect is more efficient event emission during startup.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -13,4 +13,9 @@ textadept = require('textadept') local ok, err = pcall(dofile, _USERHOME..'/init.lua') if not ok and lfs.attributes(_USERHOME..'/init.lua') then ui.print(err) end -if arg then args.process(arg) end +if arg then + events.emit(events.BUFFER_NEW) -- for the first buffer + events.emit(events.VIEW_NEW) -- for the first view + args.process(arg) +end +events.emit(events.INITIALIZED) |