From 2cea55c6e65e4ea7f735655b45d917b76e8b7945 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 30 Jul 2019 17:19:57 -0400 Subject: Fail more gracefully when attempting to create buffers on init. --- core/ui.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core') diff --git a/core/ui.lua b/core/ui.lua index a5827cef..a19785c9 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -74,13 +74,11 @@ end -- buffer is already open in a view, the message is printed to that view. -- Otherwise the view is split (unless `ui.tabs` is `true`) and the message -- buffer is displayed before being printed to. --- At this time, `ui.print()` cannot be used until Textadept is fully --- initialized. (That is, not until `events.INITIALIZED` is emitted.) -- @param buffer_type String type of message buffer. -- @param ... Message strings. -- @usage ui._print(_L['[Message Buffer]'], message) -- @name _print -function ui._print(buffer_type, ...) pcall(_print, buffer_type, ...) end +function ui._print(buffer_type, ...) _print(buffer_type, ...) end --- -- Prints the given string messages to the message buffer. -- cgit v1.2.3