From dd30725d84c2d06241b4478e48946c9f41af02e7 Mon Sep 17 00:00:00 2001 From: bud Date: Mon, 15 Feb 2021 22:38:29 +0100 Subject: [PATCH] FIX: before setting full path to window title, make sure activeView is DocView --- data/core/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/core/init.lua b/data/core/init.lua index 1fbafc4a..e8a147b5 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -7,6 +7,7 @@ local keymap local RootView local StatusView local CommandView +local DocView local Doc local core = {} @@ -688,6 +689,7 @@ function core.step() local did_keymap = false local mouse_moved = false local mouse = { x = 0, y = 0, dx = 0, dy = 0 } + DocView = require "core.docview" for type, a,b,c,d in system.poll_event do if type == "mousemoved" then @@ -725,7 +727,7 @@ function core.step() -- update window title local name = core.active_view:get_name() - local title = (name ~= "---") and ( (config.full_path_in_window_title and core.active_view.doc.filename or name) .. " - lite") or "lite" + local title = (name ~= "---") and ( (config.full_path_in_window_title and core.active_view:is(DocView) and core.active_view.doc.filename or name) .. " - lite") or "lite" if title ~= core.window_title then system.set_window_title(title) core.window_title = title