Francesco
228d6ff101
Merge pull request #466 from Guldoman/new_not_dirty
...
Avoid setting a new file as dirty if it is empty
2021-10-10 10:05:19 +02:00
Francesco Abbate
44d7f3738f
Improve highlither for document edits
...
The syntax highlighter keep a cache of the documents like tokenization.
In order to minimize the amount of tokenize re-computations we insert some
emtty lines or remove some lines in the highlither lines corresponding to
the lines added or removed to the document.
2021-10-07 19:19:08 +02:00
Francesco Abbate
8477818c96
Fix error in incremental syntax highlighter
...
In the highlither thread We should accept a previously generated line tokenization
past first_invalid_line only if the text is the same. The text can change because of
insert or remove operations.
Close #573 .
2021-10-07 19:03:16 +02:00
Guldoman
0a52861129
Revert horizontal scroll implementation
2021-09-08 07:11:50 +02:00
Guldoman
a920e5b0e6
Avoid setting a new file as dirty if it is empty
2021-08-31 23:16:02 +02:00
Adam Harrison
e541236c22
Forgot to return an 'n'.
2021-08-31 16:21:40 -04:00
Adam Harrison
1c4a4e763e
Fixed replace to make it multicursor-aware.
2021-08-30 22:56:33 -04:00
Guldoman
235b1f0385
Avoid recreating `line_numbers` table when a recalc is needed
2021-08-30 17:58:22 +02:00
Guldoman
4d0656ad7e
Avoid recreating tables when calculating the longest lines
2021-08-30 17:58:22 +02:00
Guldoman
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
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
e52362e55f
Make `Doc` keep track of max line length
2021-08-30 17:58:22 +02:00
Adam
3eb6f1dbd4
Merge pull request #430 from adamharrison/vsc-multicursor-shortcuts
...
Added in two new VSC-style multicursor shortcuts.
2021-08-30 10:52:09 -04:00
Adam Harrison
4ae16615e8
Fixed cursor movement.
2021-08-29 20:05:58 -04:00
Adam Harrison
bbe4e21f52
Fixed cursors moving around with removal and inserts with cursors. Also fixed drawing line highlights with multicursors.
2021-08-29 17:54:57 -04:00
Takase
816ceb4493
increase code readibility
2021-08-24 11:35:53 +02:00
takase1121
cf7ebdad1f
add doc:get_selection_text()
2021-08-24 11:35:53 +02:00
Adam Harrison
acd122bc34
Small fix.
2021-08-11 18:38:36 -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
jgmdev
1a51dad23c
Added Doc:on_close() for plugins
2021-06-20 00:13:07 -04:00
Adam Harrison
292c98935c
Fixed recursion error.
2021-06-18 17:33:55 -04:00
Adam Harrison
0210264552
Made get_selections a bit more flexible.
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
Adam Harrison
b065b52067
Ensured that textual inputs sort cursors so that we don't get *real* weird behaviour.
2021-06-18 17:33:55 -04:00
Adam Harrison
0f229b039d
Fixed merging. Fixed selection undo stack.
2021-06-18 17:33:55 -04:00
Adam Harrison
d3b3f26316
Added in cursor merging behaviour.
2021-06-18 17:33:55 -04:00
Adam Harrison
858f7a2a50
Added in missing boolean.
2021-06-18 17:33:55 -04:00
Adam Harrison
75658b4f3f
Removed unecessary elses.
2021-06-18 17:33:55 -04:00
Adam Harrison
2475b1624f
Fixed error.
2021-06-18 17:33:55 -04:00
Adam Harrison
b42708fe56
Cleaned up functions.
2021-06-18 17:33:55 -04:00
Adam Harrison
316671e5b7
Fixed tabbing spaces.
2021-06-18 17:33:55 -04:00
Adam Harrison
6c0d124410
Allows for rectangular selections with ctrl; also fixed tabbing.
2021-06-18 17:33:55 -04:00
Adam Harrison
08ab6cba05
Added in multiple clipboard line buffers.
2021-06-18 17:33:55 -04:00
Adam Harrison
a7f39017ff
Fixed undo stack.
2021-06-18 17:33:55 -04:00
Adam Harrison
93670a314d
Changed iterator behaviour to avoid allocating a closure each time.
2021-06-18 17:33:55 -04:00
Adam Harrison
37a3884ee2
Initial commit of multicursor. Next step is to investigate how multicursor works on various other IDEs and ape those.
2021-06-18 17:33:55 -04:00
Adam Harrison
2170ab9649
Apologies for the subpar previous commit. This fixes the bugs in that one.
2021-06-05 00:50:25 -04:00
Adam Harrison
090d67f252
Exposed indent function, and made it more flexible.
2021-06-05 00:44:35 -04:00
Adam
248d70a8ca
Add PCRE to support regular expressions
...
Use regular expressions instead of Lua patterns for find and replace editor commands.
Syntax files can now use regex or Lua patterns as before keeping backward compatibility for plugins.
2021-06-02 21:27:00 +02:00
Francesco Abbate
820d520fc3
Store doc's babs_filename without home encoding
...
This is the way was supposed to be. All the filenames are supposed to be
stored without home encoding, i.e. with explicit paths.
Should fix issue #177 and make PR
https://github.com/franko/lite-xl/pull/174
unneeded.
It may also address issue #174 but would need further verifications.
2021-05-05 08:52:14 +02:00
Francesco Abbate
5766329313
Fix filename problem
...
Close #163
2021-05-01 19:27:29 +02:00
Francesco Abbate
3721ace099
Fix logical error in on_text_change
2021-04-06 08:26:53 +02:00
Francesco Abbate
e43c980e4a
Simplifies previous commit
...
Restore the previous signature of raw_insert/remove
2021-04-06 08:18:35 +02:00
Francesco Abbate
d1984942ea
Add hook function for Doc changes
2021-04-05 00:11:56 +02:00
Francesco Abbate
de1afb3391
Add full filename path in window's title
...
Optimal implementation to limite computations in core.step.
2021-02-18 00:26:19 +01:00