diff options
Diffstat (limited to 'plugins/openselected.lua')
-rw-r--r-- | plugins/openselected.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/openselected.lua b/plugins/openselected.lua index 0a7a58a..02312b5 100644 --- a/plugins/openselected.lua +++ b/plugins/openselected.lua @@ -2,19 +2,21 @@ local core = require "core" local command = require "core.command" local keymap = require "core.keymap" +local common = require "core.common" local config = require "core.config" config.plugins.openselected = {} -if PLATFORM == "Windows" then - config.plugins.openselected.filemanager = "start" -elseif PLATFORM == "Mac OS X" then - config.plugins.openselected.filemanager = "open" -else - config.plugins.openselected.filemanager = "xdg-open" +if not config.plugins.openselected.filemanager then + if PLATFORM == "Windows" then + config.plugins.openselected.filemanager = "start" + elseif PLATFORM == "Mac OS X" then + config.plugins.openselected.filemanager = "open" + else + config.plugins.openselected.filemanager = "xdg-open" + end end - command.add("core.docview", { ["open-selected:open-selected"] = function() local doc = core.active_view.doc |