aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-11-19 23:23:26 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-11-19 23:23:26 -0500
commitd7b41ac77673a9205ba909aea524f267bf159e87 (patch)
tree311b396bcbeee131b4954be46adbc4a07b189d75
parentd2a110761100b511cdc0c714f303a9a4dcb3f814 (diff)
Do not split the view when printing messages if tabs are enabled; core/ui.lua
-rw-r--r--core/ui.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/ui.lua b/core/ui.lua
index 8c9db70e..3d98acab 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -37,7 +37,7 @@ local function _print(buffer_type, ...)
if view.buffer._type == buffer_type then ui.goto_view(i) break end
end
if view.buffer._type ~= buffer_type then
- view:split()
+ if not ui.tabs then view:split() end
for i, buffer in ipairs(_BUFFERS) do
if buffer._type == buffer_type then view:goto_buffer(i) break end
end
@@ -56,10 +56,10 @@ local function _print(buffer_type, ...)
end
---
-- Prints the given string messages to the buffer of type *buffer_type*.
--- Splits the view and opens a new buffer for printing messages to. If the
--- message buffer is already open in a view, the message is printed to that
--- view. Otherwise the view is split and the message buffer is opened or
--- displayed before being printed to.
+-- Opens a new buffer for printing messages to if necessary. If the message
+-- 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.
-- @param buffer_type String type of message buffer.
-- @param ... Message strings.
-- @usage ui._print(_L['[Message Buffer]'], message)