aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/language_python.lua
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2021-06-17 18:23:30 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2021-06-17 23:39:26 +0200
commit66275fe207430336747fbf6e90cf5de7baa86c3f (patch)
treee44479b0e411c244e0193f1fcdd90a38313ed61d /data/plugins/language_python.lua
parent4fc910dbdbfefc8143c22f058f478ffc0462bec1 (diff)
downloadlite-xl-66275fe207430336747fbf6e90cf5de7baa86c3f.tar.gz
lite-xl-66275fe207430336747fbf6e90cf5de7baa86c3f.zip
Fix error in dirname computation in TreeView
In TreeView:on_mouse_pressed() we need to find the directory a relative filename belongs to from its absolute filename. The code was using string.find to locate the relative filename within the absolute path but in some very specific cases we can find a pattern which is not the right-most one leading to a wrong directory name. Fix the error by adding a loop to make sure we find the right-most match. The standard Lua library has not a string.rfind to make a reverse search. Add a check to avoid trying to updating a topdir project directory.
Diffstat (limited to 'data/plugins/language_python.lua')
0 files changed, 0 insertions, 0 deletions