Fixed editor refresh whenever init.lua is changed, no matter the working folder

This commit is contained in:
George Sokianos 2022-08-28 18:03:34 +01:00
parent 32eeb07c54
commit 7b51ee99de
2 changed files with 3 additions and 1 deletions

View File

@ -198,6 +198,8 @@ https://git.walkero.gr/walkero/lite-xl/issues
## [2.0.3r3] - future ## [2.0.3r3] - future
### Fixed ### Fixed
- Fixed non existing path crashes on OS4 - Fixed non existing path crashes on OS4
- Fixed editor refresh whenever init.lua is changed, no matter the working
folder
## [2.0.3r2] - 2022-06-18 ## [2.0.3r2] - 2022-06-18
### Added ### Added

View File

@ -994,7 +994,7 @@ end
-- This function should get only filenames normalized using -- This function should get only filenames normalized using
-- common.normalize_path function. -- common.normalize_path function.
function core.project_absolute_path(filename) function core.project_absolute_path(filename)
if filename:match('^%a:\\') or filename:find('/', 1, true) == 1 then if filename:match('^%a:\\') or filename:match('^%w*:') or filename:find('/', 1, true) == 1 then
return filename return filename
else else
return core.project_dir .. PATHSEP .. filename return core.project_dir .. PATHSEP .. filename