Commit Graph

143 Commits

Author SHA1 Message Date
Francesco Abbate cd0f4144e2 Fix call to missing project_files_limit 2021-10-03 00:05:33 +02:00
Francesco Abbate 593916ada7 Fix bug with expanding directory when file limited
Introduce a new field in items generated by TreeView:each_item()
to point "dir" to the toplevel directory entry.

In this was we can simplify the code and know if the toplevel
directory is files limited.
2021-10-03 00:04:28 +02:00
Francesco Abbate 7aca4e6ba2 Remove the project scan thread
Since the directory monitoring is now basically working we remove the
project scan thread periodically scanning the project directory.

Each project's directory is scanned only once at the beginning when
calling the function `core.add_project_directory` and is updated
incrementally when directory change events are treated.

The config variable `project_scan_rate` is removed as well as the
function `core.reschedule_project_scan`.
2021-10-03 00:04:28 +02:00
Rongfei Wang b0b3485152 Remove duplicate command declaration (#565) 2021-10-02 18:39:22 +02:00
Francesco Abbate afd0672197 Use line/col to identify selection in replace command 2021-09-10 14:54:55 +02:00
Francesco Abbate cec1e4efb9 Do not fail search if there was an option change 2021-09-09 23:30:18 +02:00
Francesco Abbate d9afc40a17 Bring back command find-replace:select-next
Bring back the command like before to keep single selection but with
ctrl+f3 keybindings. Change the name of the new multi-cursor command
but keep the ctrl+d keybinding.
2021-09-09 21:40:41 +02:00
Guldoman 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
Francesco Abbate 403b7f6fb6 Add missing remove tooltip call 2021-09-09 15:42:16 +02:00
Francesco Abbate b440a22581 Remeber initial user text for hidden suggestions
When using hidden suggestions remember the text user was typing when
navigating suggestions.

Ensure also that in the previously searched expressiosn we have no
duplicate entries.
2021-09-09 15:42:16 +02:00
Francesco Abbate fa8b3b33b1 Use hidden suggestions also for replace dialog 2021-09-09 15:42:16 +02:00
Francesco Abbate f85fe102d9 Implement hidden suggestions for find dialog 2021-09-09 15:42:16 +02:00
Francesco Abbate dfb64fbdf1 Do not add selection with newlines in replace
If the selected text containes newlines it doesn't make sense to
use it as the initial text in the "replace text" command view.

Do not use the selected text if a newline is found in the selection.

Fix #511.
2021-09-09 15:39:41 +02:00
Francesco Abbate 67d7b894ae Add initial suggestion in open-project-folder 2021-09-07 15:23:41 +02:00
Guldoman de4072e207 Avoid checking for unique selections on non-`DocView`s 2021-09-07 15:03:00 +02:00
Adam Harrison 9d4e944549 Added in two new VSC-style multicursor shortcuts. 2021-09-07 15:03:00 +02:00
Francesco Abbate 28e8a98ffc Fix error in change-project-folder command 2021-09-07 05:21:45 -07:00
Francesco Abbate f1c004411c Add missing home_encode for change-project-folder 2021-08-28 08:08:53 -07:00
Francesco Abbate a8f4c0c4e5 Set initial text for core:change-project-folder 2021-08-27 15:22:09 +02:00
Adam 2ea62eee8f
Merge pull request #391 from adamharrison/fix-replace-tooltip
Added in additional function to remove tooltip after cancelling replace.
2021-08-14 09:12:20 -04:00
Adam 9e45b1de58
Merge pull request #390 from adamharrison/cursor-fixes
Fixed multilne cursors at the edges of docuemnts.
2021-08-14 09:12:13 -04:00
Adam Harrison 5f1e68b824 Added in additional function to remove tooltip after cancelling replace. 2021-08-14 09:11:07 -04:00
Adam Harrison 8e9c410d27 Fixed multilne cursors at the edges of docuemnts. 2021-08-14 08:59:37 -04:00
Adam 37dcc4725f
Merge pull request #376 from adamharrison/clipboard-fix
Added in a hash check to the system clipboard.
2021-08-12 15:30:50 -04:00
Adam f3e750ccb4
Merge pull request #378 from adamharrison/close-other-tabs
Added in close others, and refactored close all.
2021-08-12 09:53:04 -04:00
Adam d9fc6d407b
Merge pull request #377 from adamharrison/regex-anchored
Fixed small bug on bootup, and added in a multiline qualifier to replacements.
2021-08-12 09:52:54 -04:00
Adam Harrison aa4d91a03f Reverted hash changes; simply copy entire clipboard. 2021-08-11 18:14:46 -04:00
Adam Harrison 40c68ffcc6 Pairs -> IPairs 2021-08-10 23:18:30 -04:00
Adam Harrison 851dc07408 Added in close others, and refactored close all. 2021-08-10 23:14:40 -04:00
Adam Harrison 26a77542e3 Fixed small bug on bootup, and added in a multiline qualifier to replacements. 2021-08-10 22:01:28 -04:00
Adam Harrison 255c45b30b Since we're modifying the clipboard, actually makes way more sense to use this hash. 2021-08-10 21:29:33 -04:00
Adam Harrison 71e62ce84f Added in a hash check to the system clipboard. 2021-08-10 21:25:40 -04:00
Adam Harrison 2bf56e67c5 Changed behaviour of home. 2021-08-06 18:08:08 -04:00
Adam Harrison c461cfae93 Removed unecessary duplicates. 2021-07-20 14:50:40 -04:00
Adam Harrison 0777a6f0b8 Merged dev to master. 2021-07-20 14:39:50 -04:00
Adam Harrison 6330f4d596 Allowed find to function across different views. 2021-07-15 18:29:48 -04:00
Adam Harrison 0dda252096 Reverted find fixes. 2021-07-15 18:15:05 -04:00
takase1121 f4f33bd36b remove deprecated code 2021-07-15 18:01:24 -04:00
Adam e1ae94a01b
Merge pull request #318 from lite-xl/MacOSClose
Created an extra command, to implement appropriate cmd+w behaviour on Mac.
2021-07-09 14:30:48 -04:00
lqdev e5b2a7cbe8 reset blink timer when a new cursor is created 2021-07-01 14:50:28 +02:00
Adam Harrison fd3f25608f Created an extra command, to implement appropriat cmd+w behaviour on mac. 2021-06-27 13:18:54 -04:00
Adam Harrison 8b2fb67b9b Fixed regex replace. 2021-06-20 22:24:20 -04:00
Adam Harrison 46e939a3e6 Fixed a minor bug. 2021-06-20 21:34:42 -04:00
Adam Harrison 305921299f Added in tooltips, the ability to swap between different find modes with a keybind. 2021-06-20 21:22:37 -04:00
Adam Harrison bd02095a13 Fixed minor bugs; swap no longer returns from get. 2021-06-18 23:58:55 -04:00
Adam Harrison 704e04396f Rebased, and added the ability for ctrl to just create new cursors. 2021-06-18 17:33:55 -04:00
Adam Harrison 3541ab4aa1 Removed unecessary check. 2021-06-18 17:33:55 -04:00
Adam Harrison b5cbe3a2fb Added in the ability to iterate through cursors backwards. 2021-06-18 17:33:55 -04:00
Adam Harrison dfc57bd884 Used routine to add cursors in order correctly. 2021-06-18 17:33:55 -04:00
Adam Harrison 6915d86d59 Introduced the constraint that all cursors must be in order. 2021-06-18 17:33:55 -04:00