diff options
| author | Francesco Abbate <francesco.bbt@gmail.com> | 2021-09-19 23:50:50 +0200 |
|---|---|---|
| committer | Francesco Abbate <francesco.bbt@gmail.com> | 2021-09-19 23:52:18 +0200 |
| commit | 14dd6f1cd6535c1d752a557030cbf11b7e6a37d7 (patch) | |
| tree | de9c496294dede15182bb457c46d88309e6db1c2 | |
| parent | 8d3680ab45f68c62615842e20607e7e6d3311210 (diff) | |
| download | lite-xl-14dd6f1cd6535c1d752a557030cbf11b7e6a37d7.tar.gz lite-xl-14dd6f1cd6535c1d752a557030cbf11b7e6a37d7.zip | |
Normalize to project dir in treeview open
When left-clicking in a TreeView file we use now
core.normalize_to_project_dir to normalize correctly
the file name.
| -rw-r--r-- | data/plugins/treeview.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index 26481398..fa3ab53a 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -243,7 +243,7 @@ function TreeView:on_mouse_pressed(button, x, y, clicks) end else core.try(function() - local doc_filename = common.relative_path(core.project_dir, hovered_item.abs_filename) + local doc_filename = core.normalize_to_project_dir(hovered_item.abs_filename) core.root_view:open_doc(core.open_doc(doc_filename)) end) end |
