From a9151c0584fb0d101c1db8274e9fe654160c8ca8 Mon Sep 17 00:00:00 2001 From: Jipok Date: Mon, 9 Nov 2020 00:02:51 +0500 Subject: [PATCH] Fix wrong active tab with workspace.lua and startup error --- plugins/workspace.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/workspace.lua b/plugins/workspace.lua index 028e0a2b..b372b0ca 100644 --- a/plugins/workspace.lua +++ b/plugins/workspace.lua @@ -1,5 +1,6 @@ local core = require "core" local DocView = require "core.docview" +local LogView = require "core.logview" local workspace_filename = ".lite_workspace.lua" @@ -137,9 +138,10 @@ local function load_workspace() local ok, t = pcall(dofile, workspace_filename) os.remove(workspace_filename) if ok then + local hasLogView = core.active_view:is(LogView) local root = get_unlocked_root(core.root_view.root_node) local active_view = load_node(root, t) - if active_view then + if active_view and not hasLogView then core.set_active_view(active_view) end end