Commit Graph
58 Commits
Author SHA1 Message Date
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
GuldomanandFrancesco Abbate 20ddbd6e9f Load project module on project change (#571) 2021-10-02 18:39:23 +02:00
GuldomanandFrancesco Abbate 57bfb67f6a Add option to disable caret blinking (#572) 2021-10-02 18:39:23 +02:00
GuldomanandFrancesco Abbate 468229e4d0 Small cleanup of scale plugin 2021-10-02 18:39:23 +02:00
GuldomanandFrancesco Abbate f6b9d9ab67 Add option to disable scrolling past the end (#566) 2021-10-02 18:39:22 +02:00
GuldomanandFrancesco Abbate e2f7c984de Reset syntax highlighting on file rename 2021-10-02 18:37:00 +02:00
GuldomanandFrancesco Abbate d817944170 Force showing tabs when dragging them 2021-10-02 18:37:00 +02:00
GuldomanandFrancesco Abbate dced6da03d Implement tab drag and drop 2021-10-02 18:36:59 +02:00
GuldomanandFrancesco Abbate 86632b68de Move single tab drawing to its own function 2021-10-02 18:36:59 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 9bfec4aca5 Ensure that the primary node always has a View 2021-09-15 22:38:09 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco 0a52861129 Revert horizontal scroll implementation 2021-09-08 07:11:50 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco Abbate f9c7eeeeb8 Check if session file returned anything 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate 3278eebdad Avoid exposing treeview commands when not usable 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate 9887dd4746 Make open files follow renames 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate 59aa7f0090 Fix absolute path detection in core.project_absolute_path 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate de4072e207 Avoid checking for unique selections on non-DocViews 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate e93bbc559c Fix crash in project search when project has no files 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate d3bd35b577 Use plain string:find when matching plugin directories 2021-09-07 15:03:00 +02:00
GuldomanandFrancesco Abbate 7f338fc993 Allow tabs to always be visible 2021-09-07 14:59:03 +02:00
GuldomanandFrancesco 444c929e3c Add commands to manage tab style 2021-09-07 07:53:03 +02:00
GuldomanandFrancesco 0d2a89cb76 Don't use threads in detectindent
As it's execution only happens on load/save.
2021-09-07 07:53:03 +02:00
GuldomanandFrancesco 501be5fdfe Use configured indent values if detectindent can't detect them 2021-09-07 07:53:03 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco f18629ab64 Avoid exposing treeview commands when not usable 2021-09-02 23:19:40 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 235b1f0385 Avoid recreating line_numbers table when a recalc is needed 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco 4d0656ad7e Avoid recreating tables when calculating the longest lines 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco 92bbb30d06 Split vertical and horizontal scrollbar-related functions and variables 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 2d33fdc656 Show correct mouse cursor when hovering the horizontal scrollbar 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco c16145d562 Define horizontal scrollable size for DocView 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco f1ca00fbed Extend View to allow horizontal scrolling 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco e52362e55f Make Doc keep track of max line length 2021-08-30 17:58:22 +02:00
GuldomanandFrancesco ab6eac399c Fix crash in project search when project has no files 2021-08-29 11:13:39 +02:00
GuldomanandFrancesco 76334a7946 Use plain string:find when matching plugin directories 2021-08-29 11:11:19 +02:00
GuldomanandFrancesco 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
GuldomanandFrancesco 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
GuldomanandFrancesco c7d044f178 Allow tabs to always be visible 2021-08-27 20:43:13 +02:00