diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2021-12-05 22:56:04 -0500 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-05-22 13:02:00 -0400 |
commit | 3fcf065be6387c5bb38a46924f5ea1a7bb17850d (patch) | |
tree | 19b3c571c7e1beae325049e56e3df12a0a647637 /plugins/openselected.lua | |
parent | c569b3b3697c1656c78ec4b4d233d4ed78fa898a (diff) | |
download | lite-xl-plugins-3fcf065be6387c5bb38a46924f5ea1a7bb17850d.tar.gz lite-xl-plugins-3fcf065be6387c5bb38a46924f5ea1a7bb17850d.zip |
Appropriately merged config hashes.
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 |