Merge pull request #32 from budRich/full-path-in-window-title
Full path in window title option
This commit is contained in:
commit
f11ce523e0
|
@ -7,6 +7,7 @@ local keymap
|
||||||
local RootView
|
local RootView
|
||||||
local StatusView
|
local StatusView
|
||||||
local CommandView
|
local CommandView
|
||||||
|
local DocView
|
||||||
local Doc
|
local Doc
|
||||||
|
|
||||||
local core = {}
|
local core = {}
|
||||||
|
@ -329,6 +330,7 @@ function core.init()
|
||||||
RootView = require "core.rootview"
|
RootView = require "core.rootview"
|
||||||
StatusView = require "core.statusview"
|
StatusView = require "core.statusview"
|
||||||
CommandView = require "core.commandview"
|
CommandView = require "core.commandview"
|
||||||
|
DocView = require "core.docview"
|
||||||
Doc = require "core.doc"
|
Doc = require "core.doc"
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -688,6 +690,7 @@ function core.step()
|
||||||
local did_keymap = false
|
local did_keymap = false
|
||||||
local mouse_moved = false
|
local mouse_moved = false
|
||||||
local mouse = { x = 0, y = 0, dx = 0, dy = 0 }
|
local mouse = { x = 0, y = 0, dx = 0, dy = 0 }
|
||||||
|
|
||||||
|
|
||||||
for type, a,b,c,d in system.poll_event do
|
for type, a,b,c,d in system.poll_event do
|
||||||
if type == "mousemoved" then
|
if type == "mousemoved" then
|
||||||
|
@ -725,7 +728,7 @@ function core.step()
|
||||||
|
|
||||||
-- update window title
|
-- update window title
|
||||||
local name = core.active_view:get_name()
|
local name = core.active_view:get_name()
|
||||||
local title = (name ~= "---") and (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
|
if title ~= core.window_title then
|
||||||
system.set_window_title(title)
|
system.set_window_title(title)
|
||||||
core.window_title = title
|
core.window_title = title
|
||||||
|
|
Loading…
Reference in New Issue