Skip to content

Commit

Permalink
fix: relative path drag and drop (#81)
Browse files Browse the repository at this point in the history
* fix: use relative path for drag and drop if we're not copying images

* fix: use relative path when use_absolute_path is false
  • Loading branch information
HakonHarnes authored Aug 26, 2024
1 parent 0e047d8 commit 867feda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/img-clip/paste.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ M.paste_image_from_path = function(src_path)

-- if we are not copying images, then just insert the original path
if not config.get_opt("copy_images") then
if not config.get_opt("use_absolute_path") then
src_path = fs.relpath(src_path)
end

if not markup.insert_markup(src_path, true) then
util.error("Could not insert markup code.")
return false
Expand Down

0 comments on commit 867feda

Please sign in to comment.