Adam
0a70b13a73
Merge pull request #809 from lite-xl/merge-master-2.0
...
Merge master 2.0
2022-01-28 14:38:22 -05:00
Adam
8c8bd4692c
Merge pull request #808 from adamharrison/fix-commenting
...
Fix commenting selections.
2022-01-20 23:28:05 -05:00
Adam Harrison
b523bd5cee
Fixed end of block-style line comments.
2022-01-20 22:17:21 -05:00
Francesco Abbate
f6a0e12e31
Merge branch 'master-2.0'
2022-01-19 20:31:33 +01:00
Adam
6025c43241
Merge pull request #743 from takase1121/better-logview
...
multiple improvements to logging
2022-01-18 23:25:36 -05:00
Adam Harrison
cdbfecc5ce
Streamlined, and fixed guldo's problem.
2022-01-18 21:38:43 -05:00
Adam Harrison
30cc205cd4
Fixed issue first mentioned in #771 .
2022-01-18 21:38:38 -05:00
Adam
d3e1636881
Merge pull request #771 from takase1121/multiline-comment-command
...
add toggle-block-comment
2022-01-18 21:07:46 -05:00
Francesco Abbate
2456452f65
Fix error to close view when deleting a file
2022-01-13 16:38:20 +01:00
Francesco Abbate
656a89c494
Fix checks when opening new project directory
2022-01-09 23:26:11 +01:00
Francesco Abbate
5032e7352e
Write an initial project module if not present
2022-01-09 23:26:11 +01:00
takase1121
fc809b3172
comment the entire line when using block comment
2022-01-08 18:45:38 +08:00
Francesco Abbate
1e7075ca9f
Do not force choosing project dir to suggestion
...
When changing or opening a project directory do not
take the selected item from suggestion but simply the
entered text as it is.
Otherwise the user may be unable to choose a directory
if the text matches the beginning of suggestion.
Close #791
2022-01-05 23:42:47 +01:00
Francesco Abbate
9929ca9c2d
Fix logic with project directories suggestions
...
Attempt to fix issue #791 .
The logic set with the previous commit for suggest_directory
is similar to the one we use except the previous expression
was false do to operator precedence for "and" versus "or".
With the modification here, when opening a project directory,
we suggest the recently used projects
if the text is equal to dirname(project_dir) + "/" which
happens to be the text the command view is initially set to.
In addition we do the same if text is "". If the condition is
not met we return the suggestions from common.dir_path_suggest to
match the text entered.
Works well on Linux but may not solve the problem on Windows, it
should be tested.
2022-01-05 23:21:47 +01:00
takase1121
df0f6fb94c
make set_selections consistent
2022-01-02 19:18:08 +08:00
takase1121
e079ddfa37
refactor toggle-block-comments, make command spaces aware, set selections correctly
2022-01-02 19:14:03 +08:00
Jan200101
99ddf1fb92
Migrate to Lua 5.4
2021-12-31 13:53:01 +01:00
Francesco Abbate
fd074ff39a
Fix problem when opening project's module document
...
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.
2021-12-30 15:26:40 +01:00
takase1121
33f7fe4fda
toggle comment for whole line if nothing is selected
2021-12-26 15:12:28 +08:00
takase1121
69a857bbbf
fallback to toggle-line-comment and vice versa if needed
2021-12-26 15:05:27 +08:00
takase1121
4d31b1bc40
add toggle-block-comment
2021-12-25 12:57:00 +08:00
takase1121
00e2e281d3
remove unsaved flag from log.txt
2021-12-22 10:54:25 +08:00
Adam Harrison
978550d2a2
Restores external pastes to be normal pastes.
2021-12-21 16:23:34 -05:00
Francesco Abbate
3109263c5d
Call dmon_unwatch when changing project
...
Fix a conspicuous omission to call the dmon_unwatch function
when changing project directory.
This uncovered a bug or a quirk of the dmon library where the watch_ids
can change as a result of calling dmon_unwatch because they are just
indexes on a contiguous array. Use a workaround to always unwatch the
first valid watch_id N times.
2021-12-20 14:42:48 +01:00
takase1121
1526cd176c
move selection logic to mouse click
2021-12-19 09:36:24 +08:00
takase1121
ab4ecd515b
multiple improvements to logging
...
- added style.log table
- removed contextmenu
- use ctrl+click to copy individual log entries
- use icon instead of + or - for log items in logview
2021-12-18 10:51:44 +08:00
Jipok
7381a13d6f
Revert "Make pasting multiple lines from clipboard same way as a single line"
...
This reverts commit 6a135f7c06
.
2021-12-12 02:23:47 +05:00
Jipok
6a135f7c06
Make pasting multiple lines from clipboard same way as a single line
2021-12-10 19:25:28 +05:00
Jipok
4eee123eff
Make cursor_clipboard globa, not per doc
2021-12-08 17:34:10 +05:00
Jipok
acc7ceefd4
Correct paste after 'Cut/copy whole line'
2021-12-06 17:59:49 +05:00
Jipok
93d9e61a03
Copy/cut whole line if selection empty
2021-12-05 20:30:03 +05:00
Adam
a607ef95f9
Merge pull request #682 from Guldoman/indent_refactor
...
Refactor how to get the indentation of a `Doc`
2021-11-27 11:55:36 -05:00
Adam
1b22c85dd5
Merge pull request #694 from adamharrison/fix-context-menu
...
Added in cut, copy and paste to the context menu, amongst other things.
2021-11-27 11:44:10 -05:00
Adam Harrison
64f66e5d1e
Added in cut, copy and paste to the context menu. Also removed find pattern, as that's no longer a valid command. Also made it so commands only show up if their predicates are valid.
2021-11-23 21:03:38 -05:00
Guldoman
cd2adb4a30
Apply again 1976facaf1
...
Use reverse search for `find-replace:previous-find`
2021-11-23 22:22:52 +01:00
Adam Harrison
96db380c73
Manual merge of into .
2021-11-23 15:57:22 -05:00
Guldoman
3d9901695b
Use the new `Doc:get_indent_info` throughout `core`
2021-11-20 04:37:15 +01:00
Joshua Minor
4f55555ca9
Selection expands by word or line on double or triple click followed by drag.
2021-11-19 09:46:13 -08:00
Takase
8e6f594790
Merge branch 'master' into replace-unpack
2021-11-17 08:42:08 +08:00
Adam Harrison
18959aebef
Fixed predicate and minor propogation issue.
2021-11-16 19:12:39 -05:00
Adam Harrison
50c0659445
Also changed docview mousewheel into a scroll command.
2021-11-14 15:41:28 -05:00
Adam Harrison
c04dc648de
Refactored things out.
2021-11-14 15:41:28 -05:00
Adam Harrison
1968d31b7c
Keymap.
2021-11-14 15:41:28 -05:00
Adam Harrison
6bdcfc824d
Rearranged things to make a bit more sense.
2021-11-14 15:41:28 -05:00
Adam Harrison
ce2ec9f442
Moved commands out to the outer event loop.
2021-11-14 15:41:28 -05:00
Adam Harrison
6f53ee1b69
Added in double, and triple clicking.
2021-11-14 15:41:28 -05:00
Adam Harrison
612818ca05
Added in clicks to keymap.
2021-11-14 15:41:28 -05:00
Guldoman
6bc4fbb238
Restore `TitleView` only when needed
...
Before, every time the user came back from fullscreen, the `TitleView`
was shown regardless of its previous status.
2021-11-09 22:21:45 +01:00
Adam Harrison
5b8c08e93a
Missing parentheses.
2021-11-07 17:57:15 -05:00
Adam Harrison
24669293c7
Made it so that we originally start on the parent directory of the current project, but provide a list of recently used projects if on that directory. If a directory separator is added, then everything is as normal.
2021-11-07 17:54:42 -05:00