Guldoman
4faaf089ef
Consume unmatched character correctly
...
We must consume the whole UTF-8 character, not just a single byte.
2021-12-11 03:43:33 +01:00
Guldoman
7cb2068bb8
Split Node and EmptyView from RootView
2021-12-06 22:28:29 +01:00
Guldoman
5029e2ce29
Add name to plain text fallback syntax
2021-12-02 22:34:49 +01:00
Guldoman
d7afcb08b1
Check the entire path in TreeView new-file and new-folder commands
2021-11-30 01:11:35 +01:00
Guldoman
ef4c02ab0e
Check the entire path in TreeView predicate
2021-11-28 07:16:53 +01:00
Guldoman
59f64088e1
Remove changed files/dirs from TreeView cache
2021-11-24 06:16:54 +01:00
Guldoman
5dca37b11a
Don't search if there are no files
2021-11-24 05:03:42 +01:00
Guldoman
cd2adb4a30
Apply again 1976facaf1
...
Use reverse search for `find-replace:previous-find`
2021-11-23 22:22:52 +01:00
Guldoman and GitHub
955acf53a3
Merge pull request #673 from vincens2005/master
...
Add BigInt literal and numeric separators to js syntax highlighter
2021-11-22 22:23:23 +01:00
Guldoman
23a0f6ca79
Speed up highlighter notify
...
Avoid calling `table.{insert,remove}` multiple times, as this causes
multiple shifts in the `self.lines` table.
2021-11-22 06:23:16 +01:00
Guldoman
3176b467ca
Add names to language plugins
2021-11-21 03:46:43 +01:00
Guldoman
2de48b6ac8
Adapt detectindent to the new indentation architecture
2021-11-20 04:40:58 +01:00
Guldoman
3d9901695b
Use the new Doc:get_indent_info throughout core
2021-11-20 04:37:15 +01:00
Guldoman
b77b1c0221
Add Doc:get_indent_info
...
It returns the indentation type, size and confirmation status, used by
the `Doc`.
2021-11-20 04:36:58 +01:00
Guldoman
d0a2c913f5
Pre-populate the highlighter
...
This avoids problems with calls to `[insert,remove]_notify` on lines
that the highlighter has not yet added.
2021-11-20 01:18:37 +01:00
Guldoman
f24aa64cd5
Add soft_reset to highlighter
...
This allows clearing the `lines` table without removing entries.
2021-11-20 01:15:13 +01:00
Guldoman and GitHub
298ec8a1e9
Merge pull request #330 from lite-xl/lineguide-config
...
remove unecessary string.rep in lineguide
2021-11-17 05:08:14 +01:00
Guldoman
6a7a02542f
Draw only visible whitespaces
2021-11-17 02:57:14 +01:00
Guldoman and GitHub
0353d1d435
Merge pull request #651 from obtusedev/master
...
Add install instructions for prebuilt binaries
2021-11-11 01:18:37 +01: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
Guldoman
b3eef15e7a
Highlight any line that contains a caret
...
Now lines with selections can be highlighted if they contain a caret.
2021-11-09 21:33:47 +01:00
Guldoman and GitHub
bcfd33a7df
Merge pull request #662 from adamharrison/suggest-directory-fix
...
Made it so that we originally start on the parent directory of the cu…
2021-11-08 01:03:59 +01:00
Guldoman
f99afcd29c
In TreeView set correct active View before opening new DocView
...
Before this, the new `DocView` was always added to the primary `Node`.
With this, it gets added to the last focused `Node`.
2021-11-07 23:12:03 +01:00
Guldoman
9e721937af
Don't insert nil in highlighter lines table
...
When `highlighter:insert_notify` was called, a hole in the array was
created.
If another call to `highlighter:insert_notify` happened before the hole
was filled, a `Position out of bounds` error could have been raised.
2021-10-26 00:12:16 +02:00
Guldoman
df665ddc38
Use header to get syntax only when provided
2021-10-25 14:06:07 +02:00
Guldoman
92db048e7c
Use plain search by default in search.find
2021-10-25 00:18:20 +02:00
Guldoman
331b8e90ec
Select a new primary node when closing the current one
...
The new primary node can be any non-locked leaf node that isn't already
primary.
2021-10-23 03:34:24 +02:00
Guldoman
780c8c6d0d
Improve check for find-replace commands using has_unique_selection
2021-10-16 03:02:42 +02:00
Guldoman
ef60b24f63
Check both values returned by Node:get_locked_size
2021-10-16 02:56:01 +02:00
Guldoman
8a516d35ce
Correctly identify the start of the next character in tokenizer
...
When moving to the next character, we have to consider that the current
one might be multi-byte.
2021-10-11 22:37:31 +02:00
Guldoman
1872e82141
Make regex.match return the appropriate end index
...
This makes its behavior similar to `string.find`.
2021-10-11 22:32:50 +02:00
Guldoman
038e335c8c
Show error message when pcre2_match fails
2021-10-11 22:20:44 +02:00
Guldoman
3a71528087
Allow specifying offset for common.is_utf8_cont
2021-10-11 22:18:02 +02:00
Guldoman
3a1274fd08
Merge reverse find functions for lua patterns and regexes
2021-10-10 01:11:41 +02:00
Guldoman
cfe0c79a04
Simplify reverse search
...
Remove `plain_rfind` optimization.
2021-10-10 01:11:40 +02:00
Guldoman
af925d603b
Fix doc selection in findreplace
...
Use `last_view` if `active_view` is `CommandView`.
2021-10-10 01:11:40 +02:00
Guldoman
1976facaf1
Use reverse search for find-replace:previous-find
2021-10-10 01:11:38 +02:00
Guldoman
e7be9652c9
Add find-replace:select-previous
2021-10-10 01:10:52 +02:00
Guldoman
56eace627a
Add reverse option to search.find
2021-10-10 01:10:47 +02:00
Guldoman
db3643653e
Sanitize selections after redo
2021-10-02 22:03:52 +02:00
Guldoman and Francesco Abbate
20ddbd6e9f
Load project module on project change ( #571 )
2021-10-02 18:39:23 +02:00
Guldoman and Francesco Abbate
57bfb67f6a
Add option to disable caret blinking ( #572 )
2021-10-02 18:39:23 +02:00
Guldoman and Francesco Abbate
468229e4d0
Small cleanup of scale plugin
2021-10-02 18:39:23 +02:00
Guldoman and Francesco Abbate
f6b9d9ab67
Add option to disable scrolling past the end ( #566 )
2021-10-02 18:39:22 +02:00
Guldoman and Francesco Abbate
e2f7c984de
Reset syntax highlighting on file rename
2021-10-02 18:37:00 +02:00
Guldoman and Francesco Abbate
d817944170
Force showing tabs when dragging them
2021-10-02 18:37:00 +02:00
Guldoman and Francesco Abbate
dced6da03d
Implement tab drag and drop
2021-10-02 18:36:59 +02:00
Guldoman and Francesco Abbate
86632b68de
Move single tab drawing to its own function
2021-10-02 18:36:59 +02:00
Guldoman and GitHub
bf06aa1c4d
Load project module on project change ( #571 )
2021-10-02 16:38:45 +02:00
Guldoman and GitHub
b5f0b340d2
Add option to disable caret blinking ( #572 )
2021-10-02 16:38:10 +02:00
Guldoman
3b280401e4
Small cleanup of scale plugin
2021-10-02 03:24:35 +02:00
Guldoman and GitHub
ab0ca031fa
Add option to disable scrolling past the end ( #566 )
2021-09-30 13:10:38 -07:00
Guldoman
80a6b2245e
Reset syntax highlighting on file rename
2021-09-17 23:41:14 +02:00
Guldoman and Francesco
f6b6634868
Force showing tabs when dragging them
2021-09-17 22:25:05 +02:00
Guldoman and Francesco
3eba7cd7f1
Implement tab drag and drop
2021-09-17 22:25:05 +02:00
Guldoman and Francesco
6a3f59c423
Move single tab drawing to its own function
2021-09-17 22:25:05 +02:00
Guldoman and Francesco
66bfff2e26
Fix wrong locked sibling check
...
Previously if the split type was "hsplit", but `locked_size_x` was
falsy, `locked_size_y` was wrongly used.
2021-09-15 22:38:09 +02:00
Guldoman and Francesco
9bfec4aca5
Ensure that the primary node always has a View
2021-09-15 22:38:09 +02:00
Guldoman and Francesco
fb955e4e12
Only check if sibling is locked in the split direction
...
If the sibling is not locked in the direction of the split, it should
fill the space.
2021-09-15 22:38:09 +02:00
Guldoman and Francesco
1e8031a0e8
Fix checking if sibling is locked when removing Views
...
We only checked if sibling was locked in the `x` direction.
2021-09-15 22:38:09 +02:00
Guldoman and Francesco Abbate
aa0e083cb9
Allow find-replace:select-next to select more occurrences after wrap
...
The initial position for the search is defined by the last selection
towards the end of the file.
After reaching the end of the file, it would always select the same
selection to start the search from.
Now, we start the search from each selection, until a new occurrence is
found.
2021-09-09 21:38:12 +02:00
Guldoman and Francesco
17185075c6
Allow find-replace:select-next to select more occurrences after wrap
...
The initial position for the search is defined by the last selection
towards the end of the file.
After reaching the end of the file, it would always select the same
selection to start the search from.
Now, we start the search from each selection, until a new occurrence is
found.
2021-09-09 18:43:08 +02:00
Guldoman and Francesco
0a52861129
Revert horizontal scroll implementation
2021-09-08 07:11:50 +02:00
Guldoman and Francesco Abbate
0a36e66aba
Fix treeview:open-in-system command on Windows
...
The first argument is the title for the `CMD` window.
2021-09-07 22:35:56 +02:00
Guldoman and Francesco
474952645c
Fix treeview:open-in-system command on Windows
...
The first argument is the title for the `CMD` window.
2021-09-07 22:33:48 +02:00
Guldoman and Francesco Abbate
f9c7eeeeb8
Check if session file returned anything
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
3278eebdad
Avoid exposing treeview commands when not usable
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
9887dd4746
Make open files follow renames
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
59aa7f0090
Fix absolute path detection in core.project_absolute_path
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
de4072e207
Avoid checking for unique selections on non-DocViews
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
e93bbc559c
Fix crash in project search when project has no files
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
d3bd35b577
Use plain string:find when matching plugin directories
2021-09-07 15:03:00 +02:00
Guldoman and Francesco Abbate
7f338fc993
Allow tabs to always be visible
2021-09-07 14:59:03 +02:00
Guldoman and Francesco
444c929e3c
Add commands to manage tab style
2021-09-07 07:53:03 +02:00
Guldoman and Francesco
0d2a89cb76
Don't use threads in detectindent
...
As it's execution only happens on load/save.
2021-09-07 07:53:03 +02:00
Guldoman and Francesco
501be5fdfe
Use configured indent values if detectindent can't detect them
2021-09-07 07:53:03 +02:00
Guldoman and Francesco
e99c76f8b8
Update detectindent cache only after saving/reloading
...
Before, if the indent wasn't fully detected, `detectindent` would try to
update every second. On files with very long lines this would cause
stutters.
Now the indent is updated only once after saving/reloading.
2021-09-07 07:53:03 +02:00
Guldoman
371914af67
Check if session file returned anything
2021-09-04 00:32:01 +02:00
Guldoman
e559afaefc
Add a simple cache to DocView:get_h_scrollable_size
...
This function gets called at every `core.step`, so we should avoid
having to recalculate the scrollable size every time, as it could get
very expensive on long lines.
2021-09-03 00:55:10 +02:00
Guldoman and Francesco
f18629ab64
Avoid exposing treeview commands when not usable
2021-09-02 23:19:40 +02:00
Guldoman and Francesco
167cda23f6
Make open files follow renames
2021-09-02 23:19:40 +02:00
Guldoman
46d1203d08
Fix absolute path detection in core.project_absolute_path
2021-09-02 18:58:24 +02:00
Guldoman
f31312fd16
Avoid checking for unique selections on non-DocViews
2021-09-01 16:29:47 +02:00
Guldoman
a920e5b0e6
Avoid setting a new file as dirty if it is empty
2021-08-31 23:16:02 +02:00
Guldoman and Francesco
235b1f0385
Avoid recreating line_numbers table when a recalc is needed
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
4d0656ad7e
Avoid recreating tables when calculating the longest lines
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
92bbb30d06
Split vertical and horizontal scrollbar-related functions and variables
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
4a03aec073
Set horizontal scroll size to be more in line with other editors
...
Only scroll enough to see the whole line.
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
2d33fdc656
Show correct mouse cursor when hovering the horizontal scrollbar
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
5c7b133e0b
Add horizontal scrollbar
...
Classes and plugins that relied on having only the vertical scrollbar
should continue working.
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
f106993d0e
Fix discrepancy in max line length
...
The line length calculated in `Doc:load` didn't account for the newline
that gets added.
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
3e6afeccc0
Remove line from longest lines table only if needed
...
Checking if a line needs to be removed is faster than just trying to
remove it.
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
c16145d562
Define horizontal scrollable size for DocView
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
f1ca00fbed
Extend View to allow horizontal scrolling
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
e52362e55f
Make Doc keep track of max line length
2021-08-30 17:58:22 +02:00
Guldoman and Francesco
ab6eac399c
Fix crash in project search when project has no files
2021-08-29 11:13:39 +02:00
Guldoman and Francesco
76334a7946
Use plain string:find when matching plugin directories
2021-08-29 11:11:19 +02:00
Guldoman and Francesco Abbate
5e80149295
Avoid having no pixel_width
...
On small scales `pixel_width` could become `0`. This caused the creation
of buffers of size `0` with consequent overflows.
2021-08-28 15:56:35 +02:00
Guldoman and Francesco
07c23fbf17
Avoid having no pixel_width
...
On small scales `pixel_width` could become `0`. This caused the creation
of buffers of size `0` with consequent overflows.
2021-08-28 09:59:36 +02:00
Guldoman and Francesco
c7d044f178
Allow tabs to always be visible
2021-08-27 20:43:13 +02:00