FIX: get DocView in init instead of step, remove option for window title format'

This commit is contained in:
bud 2021-02-16 19:12:56 +01:00
parent dd30725d84
commit 3693556958
1 changed files with 3 additions and 2 deletions

View File

@ -330,6 +330,7 @@ function core.init()
RootView = require "core.rootview"
StatusView = require "core.statusview"
CommandView = require "core.commandview"
DocView = require "core.docview"
Doc = require "core.doc"
do
@ -689,7 +690,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
@ -727,7 +728,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:is(DocView) and core.active_view.doc.filename or name) .. " - lite") or "lite"
local title = (name ~= "---") 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