From 3fcf065be6387c5bb38a46924f5ea1a7bb17850d Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 5 Dec 2021 22:56:04 -0500 Subject: Appropriately merged config hashes. --- plugins/openfilelocation.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'plugins/openfilelocation.lua') diff --git a/plugins/openfilelocation.lua b/plugins/openfilelocation.lua index b16ee82..0328142 100644 --- a/plugins/openfilelocation.lua +++ b/plugins/openfilelocation.lua @@ -5,15 +5,16 @@ local config = require "core.config" config.plugins.openfilelocation = {} -if PLATFORM == "Windows" then - config.plugins.openfilelocation.filemanager = "explorer" -elseif PLATFORM == "Mac OS X" then - config.plugins.openfilelocation.filemanager = "open" -else - config.plugins.openfilelocation.filemanager = "xdg-open" +if not config.plugins.openfilelocation.filemanager then + if PLATFORM == "Windows" then + config.plugins.openfilelocation.filemanager = "explorer" + elseif PLATFORM == "Mac OS X" then + config.plugins.openfilelocation.filemanager = "open" + else + config.plugins.openfilelocation.filemanager = "xdg-open" + end end - command.add("core.docview", { ["open-file-location:open-file-location"] = function() local doc = core.active_view.doc -- cgit v1.2.3