aboutsummaryrefslogtreecommitdiff
path: root/data/core/commands/doc.lua
AgeCommit message (Collapse)Author
2022-08-16Allow command predicates to manage parameters passed to the commandsGuldoman
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-09Steps to generalize toolbar and treeview. (#1088)Adam
2022-06-25On `doc:newline` remove line content if it contains only whitespaceGuldoman
2022-06-24Fix full line cut when only a single line remainsGuldoman
2022-06-02Add `text` and `select_text` to `CommandView` optionsGuldoman
2022-05-30Use new `CommandView:enter` options tableGuldoman
2022-05-22Merge branch 'master' into master-2.1master-2.1jgmdev
2022-05-15Split out reload functionality to actual document, and added in a thread to ↵Adam Harrison
check the document, in the cases where it wouldn't be covered by dirwatch.
2022-05-15Autoreload Nagview (#942)Adam
* Modified autoreload to use new dirwatch infrastructure, and added in nagview to verify that fs changes don't stomp on our changes, unless you want them to. * Split out reload functionality to actual document, and added in a thread to check the document, in the cases where it wouldn't be covered by dirwatch. * As per request from jgmdev, added in ability to show nagview always. * Changed things over to use dirwatch. * Made sure we redrew things, added in a contingency in 'save' for times when we load a non-existent file, and added some checks.
2022-05-12Add utf8 support on doc lower and upper commandsjgmdev
2022-04-03Soft Line Wrapping (#636)Adam
Added in soft line wrapping.
2022-03-20Move cursor to the beginning or the end of its selectionGuldoman
When using `doc:move-to-{previous,next}-char` in a selection, we were moving the cursor to the character before the initial/after the last character of the selection. Now we follow what other editors do and move it to just before the initial/just after the final character.
2022-03-17Typo.Adam Harrison
2022-03-17Fixed a bunch of problems. Fixed left+click not allowing for square ↵Adam Harrison
selections, fixed esc not exiting multicursor mode, and allowed cntrl+click to remove a cursor.
2022-02-11Check entire selection to trigger `DocView:scroll_to_make_visible`Guldoman
This is needed for example when a selection has both `line1` and `col1` at 1, and the left arrow is pressed: `line2` and `col2` change, while `line1` and `col1` don't, but we still want to scroll.
2022-02-11Don't scroll DocView when executing `doc:select-all`Guldoman
2022-02-07Ignore empty lines in `line_comment`Guldoman
2022-01-28Merge pull request #809 from lite-xl/merge-master-2.0Adam
Merge master 2.0
2022-01-20Fixed end of block-style line comments.Adam Harrison
2022-01-19Merge branch 'master-2.0'Francesco Abbate
2022-01-18Streamlined, and fixed guldo's problem.Adam Harrison
2022-01-18Fixed issue first mentioned in #771.Adam Harrison
2022-01-13Fix error to close view when deleting a fileFrancesco Abbate
2022-01-08comment the entire line when using block commenttakase1121
2022-01-02make set_selections consistenttakase1121
2022-01-02refactor toggle-block-comments, make command spaces aware, set selections ↵takase1121
correctly
2021-12-26toggle comment for whole line if nothing is selectedtakase1121
2021-12-26fallback to toggle-line-comment and vice versa if neededtakase1121
2021-12-25add toggle-block-commenttakase1121
2021-12-21Restores external pastes to be normal pastes.Adam Harrison
2021-12-12Revert "Make pasting multiple lines from clipboard same way as a single line"Jipok
This reverts commit 6a135f7c06bc5d17f1df7bc24c44b13075050963.
2021-12-10Make pasting multiple lines from clipboard same way as a single lineJipok
2021-12-08Make cursor_clipboard globa, not per docJipok
2021-12-06Correct paste after 'Cut/copy whole line'Jipok
2021-12-05Copy/cut whole line if selection emptyJipok
2021-11-27Merge pull request #682 from Guldoman/indent_refactorAdam
Refactor how to get the indentation of a `Doc`
2021-11-23Added in cut, copy and paste to the context menu. Also removed find pattern, ↵Adam Harrison
as that's no longer a valid command. Also made it so commands only show up if their predicates are valid.
2021-11-20Use the new `Doc:get_indent_info` throughout `core`Guldoman
2021-11-19Selection expands by word or line on double or triple click followed by drag.Joshua Minor
2021-11-14Refactored things out.Adam Harrison
2021-11-14Keymap.Adam Harrison
2021-11-14Rearranged things to make a bit more sense.Adam Harrison
2021-11-14Moved commands out to the outer event loop.Adam Harrison
2021-11-14Added in double, and triple clicking.Adam Harrison
2021-11-14Added in clicks to keymap.Adam Harrison
2021-10-02Remove duplicate command declaration (#565)Rongfei Wang
2021-09-30Remove duplicate command declaration (#565)Rongfei Wang
2021-08-14Merge pull request #390 from adamharrison/cursor-fixesAdam
Fixed multilne cursors at the edges of docuemnts.
2021-08-14Fixed multilne cursors at the edges of docuemnts.Adam Harrison
2021-08-11Reverted hash changes; simply copy entire clipboard.Adam Harrison