| Age | Commit message (Collapse) | Author |
|
* added a stupid __tostring to every object
* moved every __tostring to just after the :extend() call
---------
Co-authored-by: Adam <adamdharrison@gmail.com>
|
|
* Initial commit to clean up projects; spun off find-file to its own plugin, removed project limit, removed the concept of a project maintaining an ordered list of files, and allowed treeview to see things like hidden files and files not actually in the project.
Normalizing things, fixed typo.
Abstracted root project, and made things more in line with current master behaviour.
Removed unused legacy code, as well as ensured that we use absolute paths.
Fixed issue with backslahes on linux, will look at windows at some point.
Removed stray print.
Removed orphaned function.
Removed extraneous command.
Fixed the ability to close project folders.
Removed superceded function.
Applied jgm's suggestions.
* Bump modversion.
* Bumped modversion and changed a few minor things.
* Added in handling of ignored files.
* Fixed small issue.
* Fixed issue with absolute arguments.
* Removed home encoding; may revert this if I can find out why it was done.
* Fixed minor issue with file suggestions.
* Cleaned up treeview.
* Typo.
* Added in visible.
* Ensured that the appropriate project module is loaded.
* Fixed improper rebase.
* Abstracted out the storage system of the workspace plugin so other plugins can use it.
* Fixed double return.
* Fixed functional issue.
* Added documentation.
* Sumenko reports duplicate function definitions, unsure why.
* Fixed minor bug with workspace.
* Fixed switching projects on restart.
* Harmonized spacing around asserts, and fixed an issue forgetting to set has_restarted.
* Made project an object.
* Removing unecessary yields.
* Removed unecessary fallback.
* Removed unecessary line.
* Reveted backslash handling, as it doesn't seem to make any difference.
* Spacing.
* Only stonks.
* Removed uneeded error handling.
* Added in function to determine project by path, and added in deprecation warnings for legacy interface.
* Removed storage module.
* Typo.
* Changed to use deprecation log instead of regular warn so as to not spam logs.
* Fixed small bug with saving workspaces on project change.
* Update data/core/init.lua
---------
|
|
This is needed to get the last character of the "selection".
For example:
```lua
doc:get_text(1, 1, #doc.lines, math.huge)
```
will return everything but the last newline, while
```lua
doc:get_text(1, 1, #doc.lines, math.huge, true)
```
will return the last newline too.
|
|
|
|
* feat(system): add system.ftruncate
* fix: EPERM writing to hidden files on Windows
* chore(doc): fix capitalization
* refactor(system): make ftruncate length optional
* refactor(doc): don't specify length
|
|
it was off by 1
|
|
table index
|
|
* Use `\r\n` for new files on Windows
* Add `config.line_endings`
|
|
* added text overwriting
* rewrote `DocView:draw_caret` to not use the order of draws
* forgot to delete some old code in `DocView:draw_overlay`
also added a temporary solution to overwriting
and added the missing arguments in `DocView:draw_ime_decoration`
and fixed `DocView:draw_caret`
* accidentally broke the `draw_caret` call in `draw_overlay` in the process
* multiline
* fixed calling `Doc:get_char` as a function
that, in turn, crashed the editor because "can't index a number"
* move and rename some stuff
* remove unneeded extra check
I just had to change the `~=` to `<` in the second condition
* overwrite disregards pasting text
* disregard overwrite on selections; doc only removes selection
* Fixed error where `doc` was used, instead of `self`.
---------
Co-authored-by: ThaCuber <70547062+ThaCuber@users.noreply.github.com>
Co-authored-by: Adam Harrison <adamdharrison@gmail.com>
|
|
|
|
|
|
|
|
If `line` is out of range, return the `col` "closest" to the original
values.
|
|
* Revert "core syntax: strip the path from filename on syntax.get (#1168)"
This reverts commit af6c4bc152234e13f3e12819e361e1b92a387013.
The previous behavior was correct and allowed access to the full path for path-dependant syntaxes.
* Use `Doc.abs_filename` to obtain syntax when possible
This allows matching full paths in language syntaxes, but we lose the
possibility of matching the project root.
|
|
* Fix incorrect check in doc:raw_remove
Restore caret position on command doc:cut
* merge cursors and fix new line in clipboard
* add new line to the last copied line
|
|
* correctly handle overlapping selections merge cursors in Doc:raw_remove
|
|
|
|
* Add `Doc:get_selection_idx`
* Make multicursor paste add a cursor at the end of each paste
* Better manage paste of multicursor whole line copy
* Document `Doc:get_selection_idx`
* Keep track of last added selection in `Doc`
* Make use of `doc.last_selection` in `Doc` commands
* Make `Doc:get_selection` return the `Doc.last_selection` if possible
|
|
|
|
|
|
|
|
|
|
check the document, in the cases where it wouldn't be covered by dirwatch.
|
|
Before the addition of multi-cursor support, we just returned the second
return value of the "replacer" function to the caller.
With the introduction of multi-cursors, we naively summed the second
return values for each cursor.
In some cases the "replacer" function doesn't return any second value,
so we tried to do math with `nil`, thus throwing errors.
Now the second return value is added to a table which is then returned
to the caller.
|
|
|
|
selections, fixed esc not exiting multicursor mode, and allowed cntrl+click to remove a cursor.
|
|
|
|
It wasn't fine to call core.open_doc without filename argument
and later call Doc:save without providing both the filename and
the absolute filename. It was giving a Doc in an inconsistent
status where self.filename was set but not self.abs_filename.
Added an asset to detect early the problem if ever happens again.
In turn the problem prevented the project's module hook to work if the
file was newly created.
|
|
|
|
|
|
|
|
Refactor how to get the indentation of a `Doc`
|
|
as that's no longer a valid command. Also made it so commands only show up if their predicates are valid.
|
|
|
|
|
|
It returns the indentation type, size and confirmation status, used by
the `Doc`.
|
|
This avoids problems with calls to `[insert,remove]_notify` on lines
that the highlighter has not yet added.
|
|
This allows clearing the `lines` table without removing entries.
|
|
|
|
Avoid setting a new file as dirty if it is empty
|
|
The syntax highlighter keep a cache of the documents like tokenization.
In order to minimize the amount of tokenize re-computations we insert some
emtty lines or remove some lines in the highlither lines corresponding to
the lines added or removed to the document.
|
|
The syntax highlighter keep a cache of the documents like tokenization.
In order to minimize the amount of tokenize re-computations we insert some
emtty lines or remove some lines in the highlither lines corresponding to
the lines added or removed to the document.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The line length calculated in `Doc:load` didn't account for the newline
that gets added.
|