diff options
author | Guldoman <giulio.lettieri@gmail.com> | 2022-11-02 08:10:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 08:10:57 +0100 |
commit | 9bf5649c7df6bbd746956e9a96b616f61a59fa9b (patch) | |
tree | 725e2d12dc826f8ebe73807a705371cb4c5af4d9 /plugins/texcompile.lua | |
parent | 49139e03398c9d0ecb347267a4882a4eb3f7ee23 (diff) | |
download | lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.tar.gz lite-xl-plugins-9bf5649c7df6bbd746956e9a96b616f61a59fa9b.zip |
Use new `command.add` syntax (#136)
Diffstat (limited to 'plugins/texcompile.lua')
-rw-r--r-- | plugins/texcompile.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/texcompile.lua b/plugins/texcompile.lua index af31aed..557e404 100644 --- a/plugins/texcompile.lua +++ b/plugins/texcompile.lua @@ -34,11 +34,11 @@ local keymap = require "core.keymap" -- Note that in the example we have used "^ " for spaces that appear in the path. -- It is required on Windows for path or file names that contains space characters. -command.add("core.docview", { - ["texcompile:tex-compile"] = function() +command.add("core.docview!", { + ["texcompile:tex-compile"] = function(dv) -- The current (La)TeX file and path - local texname = core.active_view:get_name() - local texpath = common.dirname(core.active_view:get_filename()) + local texname = dv:get_name() + local texpath = common.dirname(dv:get_filename()) local pdfname = texname:gsub("%.tex$", ".pdf") -- LaTeX compiler as configured in config.texcompile |