From 7f6a2710ef0748c99cf607253b80a6d7d7daff7a Mon Sep 17 00:00:00 2001 From: rxi Date: Tue, 12 May 2020 14:44:29 +0100 Subject: [PATCH] Made clicking the message on the StatusView open a LogView --- data/core/statusview.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/core/statusview.lua b/data/core/statusview.lua index 634f710..24c408f 100644 --- a/data/core/statusview.lua +++ b/data/core/statusview.lua @@ -1,8 +1,10 @@ local core = require "core" local common = require "core.common" +local command = require "core.command" local config = require "core.config" local style = require "core.style" local DocView = require "core.docview" +local LogView = require "core.logview" local View = require "core.view" @@ -20,6 +22,14 @@ function StatusView:new() end +function StatusView:on_mouse_pressed() + if system.get_time() < self.message_timeout + and not core.active_view:is(LogView) then + command.perform "core:open-log" + end +end + + function StatusView:show_message(icon, icon_color, text) self.message = { icon_color, style.icon_font, icon,