From 7fbefe40d527e3aa38e04ae084927a275d80fae0 Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 30 May 2020 08:53:48 +0100 Subject: [PATCH] Made `system.set_window_title` only be called on title change --- data/core/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/core/init.lua b/data/core/init.lua index 5ba0f005..a9aa6a0e 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -400,10 +400,10 @@ function core.step() -- update window title local name = core.active_view:get_name() - if name ~= "---" then - system.set_window_title(name .. " - lite") - else - system.set_window_title("lite") + local title = (name ~= "---") and (name .. " - lite") or "lite" + if title ~= core.window_title then + system.set_window_title(title) + core.window_title = title end -- draw