diff options
author | 2020-08-22 18:57:41 -0400 | |
---|---|---|
committer | 2020-08-22 18:57:41 -0400 | |
commit | 6815e58b4abe98f30152bcaa4a02066728f2bb65 (patch) | |
tree | 151e43c9ea8b5aa9138485e4cf89ced02d844934 | |
parent | cf9d617f13c38c27271eb88fd61a9495bca514d8 (diff) |
Fixed some issues with r2916 discovered when running tests.
-rw-r--r-- | core/ui.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/ui.lua b/core/ui.lua index 3aded622..e726d1f4 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -49,12 +49,15 @@ local function _print(buffer_type, ...) buffer = _G.buffer.new() buffer._type = buffer_type elseif not ui.silent_print then - if not ui.tabs and #_VIEWS == 1 then view:split() end for _, view in ipairs(_VIEWS) do if view.buffer._type == buffer_type then ui.goto_view(view) break end end if view.buffer._type ~= buffer_type then - if #_VIEWS > 1 then ui.goto_view(1) end + if #_VIEWS > 1 then + ui.goto_view(1) + elseif not ui.tabs then + view:split() + end view:goto_buffer(buffer) end end |