Skip to content

Commit

Permalink
fix issue #954
Browse files Browse the repository at this point in the history
  • Loading branch information
Yggdroot committed Sep 15, 2022
1 parent 404d772 commit f090cb4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions autoload/leaderf/python/leaderf/fileExpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,13 +911,12 @@ def _acceptSelection(self, *args, **kwargs):
and not vim.current.buffer.options["modified"]):
lfCmd("setlocal bufhidden=wipe")

m=lfEval("get(g:, 'Lf_FileActions', {})")
m = lfEval("get(g:, 'Lf_FileActions', {})")
if m != {}:
try:
from os.path import splitext
extension = splitext(file)[-1]
extension = os.path.splitext(file)[-1]
filecmd = m[extension]
lfCmd(f"{filecmd} %s" % escSpecial(file))
lfCmd("%s %s" % (filecmd, escSpecial(file)))
except KeyError:
lfCmd("hide edit %s" % escSpecial(file))
else:
Expand Down

0 comments on commit f090cb4

Please sign in to comment.