Commit Graph

1239 Commits

Author SHA1 Message Date
George Sokianos 0cb20ab7b2 a small fix in case the text is nil 2023-01-08 20:42:19 +00:00
George Sokianos 789004ea2c Updates and fixes for the latest available code, for 2.1 release 2022-10-10 19:06:19 +01:00
George Sokianos 2bdfd5a694 Merge branch 'master' into amiga-2.0 2022-09-26 17:27:35 +01:00
George Sokianos a5f073d23b Prepare 2.0.3r3 release 2022-09-26 15:44:38 +01:00
George Sokianos 98711e1cb5 Fixes with paths to avoid crashes and now the partition folders are shown in suggestions 2022-09-26 14:21:51 +01:00
George Sokianos b15bcbd397 Fixed search on MorphOS 2022-09-26 14:20:34 +01:00
jgmdev e2884895ce core start: added missing ';' to package.cpath 2022-09-25 17:13:07 -04:00
Adam 6bb08fc68f
Added in ability to have `init.so` as a require for cpath. (#1126) 2022-09-25 17:08:21 -04:00
Adam 5ada80b9df
Added in native modules suffixes. (#1111)
* Added in native modules with suffixes, giving priority to those with matching architectures and platforms.

* PowerPC isn't x86, and it's x86_64.

* Changed things over to allow compiler to set a tuple, makes more sense from a build perspective.

* Spelling mistake.

* Added in arm target tuples.
2022-09-18 18:27:50 -04:00
jgmdev 4134b30ffd core: remapped core:restart to `ctrl+alt+r`
Commonly `ctrl+shift+r` is used in most editors for find and
replace operations, also the regexreplacepreview.lua plugin makes
a more appropriate use of this binding.
2022-09-16 11:31:05 -04:00
Jefferson González 5a80d3547e
contextmenu: resize on scale changes (#1117) 2022-09-15 00:57:45 -04:00
Jefferson González 862ed9ad6a
plugin scale: added option to set default scale (#1115) 2022-09-15 00:54:44 -04:00
Adam 10d810b7d7
Added in simple directory search to treeview. (#1110) 2022-09-14 00:14:13 -04:00
Guldoman a19cfb4f80
Strictly limit find/replace commands to `core.docview` (#1108)
Without this, find/replace commands applied to the `CommandView` too,
with buggy results.
2022-09-13 22:29:52 -04:00
jgmdev bead59a898 autocomplete: properly replace current partial symbol 2022-09-12 22:41:50 -04:00
George Sokianos 283f1d0837 Fixed an issue when the user added a directory in the project that already existed 2022-08-29 20:28:33 +01:00
George Sokianos 7b51ee99de Fixed editor refresh whenever init.lua is changed, no matter the working folder 2022-08-28 18:03:34 +01:00
Guldoman c25f83da90
Make predicate for some `TreeView` commands stricter
This avoids performing the `treeview:new-folder` command on ctrl + 
double click.
This happens because `ctrl+lclick` (which is the keybinding for 
`treeview:new-folder`) is triggered also by ctrl + double click, which 
isn't captured by anything else.
2022-08-21 20:03:32 +02:00
Aqil Contractor 9b1bfeacac
Added a smoothing and strikethrough option to font loading. (#1087)
* Added a smoothing option to font loading.
* Added a font strikethrough option to font loading.
* Fixed underline applying incorrectly in cases of non-underlined fallback fonts being used.

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2022-08-20 16:15:08 -04:00
Jefferson González f07b62f852
Merge pull request #1100 from Guldoman/PR_fix_path_suggest
Remove dot slash from suggested paths in `common.path_suggest`
2022-08-17 13:59:19 -04:00
Jefferson González 76f71b2846
Merge pull request #1098 from Guldoman/PR_command_predicate_params
Allow command predicates to manage parameters, allow overwriting commands
2022-08-16 18:20:30 -04:00
Guldoman 4c186b07a3
Be more lenient with appending `PATHSEP` in `common.path_suggest` in Windows
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-17 00:11:19 +02:00
Guldoman e8ca861512
Remove final `PATHSEP` in `common.normalize_volume` 2022-08-16 23:53:03 +02:00
Guldoman a4355c6536
Add `PATHSEP` before listing the directory in `common.path_suggest`
Before, in Windows, listing `.` instead of `.\` resulted in unexpected 
results.
2022-08-16 23:51:12 +02:00
Guldoman 6aa96556c0
Replace `assert` with `core.log_quiet` on command replace
This caused issues when saving the user module with commands defined
inside it, as it resulted in the user-defined commands trying to
overwrite themselves and failing.
2022-08-16 22:18:50 +02:00
Guldoman d944bd85ec
Add predicate memoization to `command.get_all_valid` 2022-08-16 22:13:25 +02:00
Guldoman 06b9953777
Use `Object:is` instead of direct metatable comparison in `autocomplete` 2022-08-16 22:13:25 +02:00
Guldoman cf29a6a45f
Allow command predicates to manage parameters passed to the commands
When a command is performed with parameters, those are now passed to the
predicate.
The predicate can then return, after the validity boolean, any other
value that will then be passed to the actual command.
If the predicate only returns the validity boolean, the original
parameters are passed through to the actual command.

This allows predicates to manipulate the received parameters, and allows
them to pass the result of an expensive computation to the actual
command, which won't have to recalculate it.

String and table predicates will now also return `core.active_view`.
2022-08-16 22:13:16 +02:00
Ben Larisch a6bbd3c8a9
language_python: add syntax support for async/await 2022-08-16 09:52:46 +02:00
Guldoman 4b4c54ba65
Remove dot slash from suggested paths in `common.path_suggest`
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-08-16 08:08:04 +02:00
Adam 6ccc5f6dde
Steps to generalize toolbar and treeview. (#1088) 2022-08-09 14:53:30 -04:00
Guldoman 4db71836af
Clear default Lua require path (#1085)
This is mainly done to avoid requiring from the current working 
directory of the editor.

This also avoids requiring from system paths, as it was already the case 
for the native modules search path.
2022-08-03 11:13:26 -04:00
ian` 2667f9476b
Fix "hard" indent column info on status view. (#1078)
* Fix "hard" indent column info on status view.

* Update tabs calculation and add "byte" number info

* Add config.show_char_byte_info

* Add show char byte toggle command.

it should be added on the commands/statusbar.lua, but there is no config module loaded before and i won't to add it.

* Update config.lua

* Update statusview.lua
2022-07-22 19:01:54 +02:00
Jefferson González e4bef5c5b6
Merge pull request #1080 from jgmdev/PR/fix-commandview-caret
CommandView: do not change caret size with config.line_height
2022-07-17 12:29:52 -04:00
jgmdev c7781a76a9 CommandView: do not change caret size with config.line_height 2022-07-15 11:27:27 -04:00
cisoun 366cadf605
Add font style options in user module 2022-07-15 12:05:59 +02:00
Guldoman d7f9b30d05
`drawwhitespace`: Invalidate cache on indent size change 2022-07-15 06:54:03 +02:00
Jefferson González 86d45458f8
Merge pull request #1070 from Guldoman/PR_get_selections_swap_return
Make `Doc:get_selection[s]` return if the selection was actually sorted
2022-07-13 11:13:43 -04:00
Cyriaque Skrapits af3e2c971c
`language_python`: Add new patterns (#1074)
* `language_python`:  Add new patterns

This commit provides:
 - multiline comments support;
 - unicode string symbol highlighting;
 - class names as keyword2.
2022-07-13 11:06:42 -04:00
Guldoman 2dac3667cb
Merge pull request #1073 from ncarrezdev/ncarrezdev/synxtax-corrections
[chore]: Update syntax
2022-07-13 15:05:26 +02:00
NCarrezDev 7f9287a7e7 [chore]: Delete useless $
follow up on Guldoman's comment
2022-07-13 09:16:32 +02:00
Guldoman 9cfa3ecd56
Make `StatusView:add_item` accept a table 2022-07-13 07:22:42 +02:00
Guldoman 693bd11b22
Don't wrap around if there are no suggestions in `CommandView` 2022-07-11 23:28:08 +02:00
Guldoman e7c4bdfe8e
Make `Doc:get_selection[s]` return if the selection was actually sorted 2022-07-11 05:39:55 +02:00
NCarrezDev 030dcc1e62 [chore]: Update syntax
Harmonizing the syntax files
Now inline comment are a single string instead of a table of strings.

-(language_c): Removed whitespaces breaking indent
-(language_html): Removed trailing whitespace
2022-07-06 10:15:44 +02:00
Jefferson González e646f2fb28
Merge pull request #1065 from Guldoman/PR_log_size
Increase `config.max_log_items`, add a scrollbar and optimize `LogView`
2022-07-05 18:07:33 -04:00
Jefferson González f49fd1b477
Merge pull request #1064 from Guldoman/PR_md_single_math
`language_md`: Limit inline math mode to the current line
2022-07-05 18:01:59 -04:00
Jefferson González f611556f1a
Merge pull request #1062 from Guldoman/PR_fix_logview_on_error
Fix opening `LogView` when reloading customizations
2022-07-05 18:00:56 -04:00
Jefferson González 58336f6060
Merge pull request #1060 from Guldoman/PR_drag_whitespace_newline
On `doc:newline` remove line content if it contains only whitespace
2022-07-05 17:56:13 -04:00
Jefferson González 041456cf38
Merge pull request #1059 from Guldoman/PR_no_indent_empty_lines
Don't indent empty lines in a selection
2022-07-05 17:52:17 -04:00