aboutsummaryrefslogtreecommitdiff
path: root/data/core/common.lua
AgeCommit message (Collapse)Author
2022-08-17Be more lenient with appending `PATHSEP` in `common.path_suggest` in WindowsGuldoman
This allows to use the Unix separator without resulting in ugly suggestions that added the Windows separator too. For example: Before: `data/` -> `data/\core\` After: `data/` -> `data/core\`
2022-08-16Remove final `PATHSEP` in `common.normalize_volume`Guldoman
2022-08-16Add `PATHSEP` before listing the directory in `common.path_suggest`Guldoman
Before, in Windows, listing `.` instead of `.\` resulted in unexpected results.
2022-08-16Remove dot slash from suggested paths in `common.path_suggest`Guldoman
When no `root` is specified and the initial `path` is empty, the initial `path` becomes `.`. This results in returned files/dirs that are prepended with `./`. Now, in that case, `./` is removed.
2022-06-07Merge pull request #1021 from Guldoman/PR_lax_common_mergeJefferson González
Make `common.merge` work with invalid arguments
2022-06-05Make `common.merge` work with invalid argumentsGuldoman
This is needed because users could try to enable plugins with `config.plugins.plugin_name = true`. Before, this would result in `common.merge` throwing an error; now it just returns a copy of the "base" table.
2022-06-01Allow `common.path_suggest` to specify a root directoryGuldoman
This will make relative paths start from `root`.
2022-06-01Add `common.is_absolute_path`Guldoman
2022-05-03Add pretty printing to `common.serialize`Guldoman
2022-01-28Go back to `common.match_pattern` and use `table.unpack` directly on ↵Dheisom Gomes
function `core.add_thread`
2022-01-28Added support to use a array of regex to ignore filesDheisom Gomes
2022-01-22Added in new merge method, and run it on plugins. Also made it so plugin ↵Adam Harrison
configs can be set anywhere, even if we don't know the plugin beforehand.
2021-12-31Migrate to Lua 5.4Jan200101
2021-12-20Support rgba hex formatJipok
2021-10-22Merge pull request #612 from Guldoman/fix_regexFrancesco
Fix regex in tokenizer
2021-10-21Fix error introduced with 43fc35d7Francesco Abbate
2021-10-21Do not use normalize_path when not neededFrancesco Abbate
2021-10-21First attempt to treat correctly network volumesFrancesco Abbate
On windows paths belonging to network volumes will be gives like: \\address\share-name\path Now the code recognize these paths and treat them correctly.
2021-10-11Allow specifying offset for `common.is_utf8_cont`Guldoman
2021-10-02Implement tab drag and dropGuldoman
2021-09-07Fix error when opening root directoryFrancesco Abbate
2021-08-11If multiple '..' handle correctly.Adam Harrison
2021-08-11Handle proper path normalization if we begin with '..'.Adam Harrison
2021-08-01Merge branch 'master' into MergedMergedAdam
2021-07-26+readability, hopefullyep
2021-07-26fix workspace folders on different drives in Windowsep
2021-07-20Removed unecessary duplicates.Adam Harrison
2021-07-20Merged dev to master.Adam Harrison
2021-07-15Fix problem with previous commitFrancesco Abbate
Desastrous problem where core.normalize_path was removing the leading /.
2021-07-15Remove duplicate normalize_path functionFrancesco Abbate
Use the function defined in the "common" module. Move the check for not-nil filename from common.normalize_path to core.open_doc. In this latter the filename can be nil if a new unnamed document is created.
2021-06-28Added system.rmdir(path)jgmdev
It is reported that the built-in lua function os.remove(path) does not removes empty directories on windows. To fix this a system.rmdir function is introduced that calls a native win32 function. Also common.rm(path, recursively) was added which wraps system.rmdir() to easily delete an entire folder with all its contents.
2021-06-18Cleaned up functions.Adam Harrison
2021-06-13Fix undeclared NagView findindex() by moving it to common.jgmdev
2021-06-13Integrate mkdirp function in common module (#265)Francesco
Move the function mkdirp into common to be generally available. Use the new common.mkdirp from create_user_directory() from core/init.lua replacing previous parent directory creation code within the function. The previous mkdirp function did not work on Windows where absolute paths starts with a drive letter. The code from create_user_directory() did not have this problem but was wrong in the way it was creating the nested directories. The new implementation in common.mkdirp fix both problems.
2021-05-24Fix problem with filenames missing normalizationFrancesco Abbate
2021-05-16Allowed for optional boolean to better match filenames. (#180)Adam
2021-05-06Fix creating a new file (#179)tsukanov-as
2021-05-05Use string.find only in common.home_encodeFrancesco Abbate
Should be slightly more efficient.
2021-05-01Nil check, to avoid issues for files that don't have filenames yet (new ↵Adam
files, etc..) (#169)
2021-05-01Fix filename problemFrancesco Abbate
Close #163
2021-03-06Ensure filename are store relative to project directoryFrancesco Abbate
2021-02-17Fix reload module problem on windowsFrancesco Abbate
2021-02-16Use tilde expansion when running save-as commandFrancesco Abbate
2021-01-10Fix problem when project directory has a trailing slashFrancesco Abbate
2021-01-03Fix behavior when selecting project directoriesFrancesco Abbate
2020-12-30Create common.serialize functionFrancesco Abbate
2020-12-28Add command to remove a directory from the projectFrancesco Abbate
In addition directories can be removed with a mouse middle-click in the tree view pane.
2020-12-20Add HOME directory expansion also for open file commandFrancesco Abbate
2020-12-19Move HOME expand/encode into common moduleFrancesco Abbate
2020-12-07Begin reworks of project managerFrancesco Abbate