aboutsummaryrefslogtreecommitdiff
path: root/plugins/copyfilelocation.lua
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2021-04-21 13:37:22 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2021-04-21 13:37:22 +0200
commit787f31d3eb85541726e066472e1fd20c44939393 (patch)
tree2de7f6076577e18b5bb01ad7539bf4a8993cada6 /plugins/copyfilelocation.lua
parentb09046a719cafa8f75c542123828cd76be460a2a (diff)
parent2fefdae0bb729edb29c6b90e89d34a9e664fbf14 (diff)
downloadlite-xl-plugins-787f31d3eb85541726e066472e1fd20c44939393.tar.gz
lite-xl-plugins-787f31d3eb85541726e066472e1fd20c44939393.zip
Merge branch 'lite-xl-1.16'
Diffstat (limited to 'plugins/copyfilelocation.lua')
-rw-r--r--plugins/copyfilelocation.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/copyfilelocation.lua b/plugins/copyfilelocation.lua
index d365240..48520b8 100644
--- a/plugins/copyfilelocation.lua
+++ b/plugins/copyfilelocation.lua
@@ -1,3 +1,4 @@
+-- lite-xl 1.16
local core = require "core"
local command = require "core.command"
local config = require "core.config"
@@ -6,12 +7,11 @@ local config = require "core.config"
command.add("core.docview", {
["copy-file-location:copy-file-location"] = function()
local doc = core.active_view.doc
- if not doc.filename then
+ if not doc.abs_filename then
core.error "Cannot copy location of unsaved doc"
return
end
- local filename = system.absolute_path(doc.filename)
- core.log("Copying to clipboard \"%s\"", filename)
- system.set_clipboard(filename)
+ core.log("Copying to clipboard \"%s\"", doc.abs_filename)
+ system.set_clipboard(doc.abs_filename)
end
})