Commit graph

26 commits

Author SHA1 Message Date
Alf Eaton
09c5bf72d2 [cm6] Use Cmd on macOS for cloneSelectionVertically (#12855)
GitOrigin-RevId: ea72da47f2ebb377cf22af061ab616a021950502
2023-05-04 08:04:57 +00:00
Alf Eaton
6c21f0821c [cm6] Handle multiple selection ranges when applying snippets (#12830)
* Use fork of @codemirror/autocomplete
* Handle multiple selection ranges when applying snippets

GitOrigin-RevId: 04afc087ac127206463ea3d4950284a50308364a
2023-05-04 08:04:39 +00:00
Alf Eaton
e0d9069131 [cm6] Add "within selection" option to the search form (#12798)
* Use forked @codemirror/search
* Use getPanel to get the search panel
* Remove layer-based highlightSelectionMatches
* Add "within selection" option to the search form
* Add test for "replace all within selection"
* Fix tests

GitOrigin-RevId: 95ce76fd017f96278b04c16a1fd34f785f7504a3
2023-05-01 08:05:02 +00:00
Alf Eaton
1da94f029c [cm6] Avoid selecting a search match when re-opening the search panel (#12797)
GitOrigin-RevId: 32bb03b71ce56cc0dbe6f7c92cc6d85151ef1971
2023-05-01 08:04:36 +00:00
Alf Eaton
40cbfc451a [cm6] Improve search match scrolling into view (#12787)
GitOrigin-RevId: 6ce9b86253a9c3a2c6ff44c10f78204ff16bd6e2
2023-05-01 08:04:27 +00:00
Domagoj Kriskovic
cd689e4e1f [cm6] Show Regex errors in find & replace (#12720)
* [cm6] Show Regex errors in find & replace

* cleanup, isInvalidRegExp function

* no state variable, less color var

* use @brand-dager

* using var(--ol-cm-search-form-focus-shadow)

* using state-danger-border

GitOrigin-RevId: 844c9dfee5a56d2a7494cd86c266acbe9eacd033
2023-04-27 08:05:14 +00:00
Mathias Jakobsen
17ca11fae0 [cm6] Add save command to emacs (recompiles doc) (#12742)
GitOrigin-RevId: 10cda3f14411147d0d900f688d9b5017f49d2db2
2023-04-25 08:05:35 +00:00
Alf Eaton
f409b96f00 Fix padding in emptyLineFiller and lineWrappingIndentation extensions (#12736)
GitOrigin-RevId: 8b6a2ad0beb802d917f3e998c378792c6156836a
2023-04-25 08:05:27 +00:00
Alf Eaton
8537a7a5d0 Handle mode: 'none' in keybindings (#12717)
GitOrigin-RevId: 77d040352b1de2311f663a8b33bd0d20d79a30ae
2023-04-25 08:05:18 +00:00
Alf Eaton
4bb582bdd8 [cm6] Improve Tab behaviour in read-only mode (#12715)
* Improve Tab behaviour in read-only mode
* Remove Tab shortcuts from Markdown configuration

GitOrigin-RevId: 9eb804fcf820b37b371b1c351cfbdf7bff1ced89
2023-04-25 08:05:10 +00:00
Alf Eaton
08ccdb79d3 [cm6] Improve alignment of review panel elements (#12710)
* Use a block widget for top padding
* Update review panel positions when the editor geometry changes
* Remove editorPaddingTop from position calculations
* Recalculate review panel on start adding comment
* Assert on line content rather than index
* Use broadcastChange
* Keep focus in the editor when opening the review panel
* debounce broadcastChange
* Set CULL_AFTER to Infinity

GitOrigin-RevId: a8d7b8967736a9164b5264eeaadf334c15ec95ce
2023-04-25 08:05:02 +00:00
Alf Eaton
acf6abb0fb [cm6] Use a block widget for padding at the top of the editor (#12705)
GitOrigin-RevId: 000ce9c90ea6b2ca72ab969704354a19fcea7a87
2023-04-25 08:04:53 +00:00
Mathias Jakobsen
81a8fa2ce3 Merge pull request #12672 from overleaf/ae-emacs-compile-keydown
[cm6] Stop propagation of Ctrl-s when Emacs keybindings are enabled

GitOrigin-RevId: 32bebefb583ad813931af221cce7498d40fdbaf1
2023-04-21 08:03:11 +00:00
Mathias Jakobsen
3bd174631a Merge pull request #12696 from overleaf/mj-rt-skip-more-preamble
[cm6+rt] Update skip-preamble-cursor to skip \maketitle and abstract

GitOrigin-RevId: 3c54d8159bfdb431763872790a2b82ac4cffc09f
2023-04-21 08:02:59 +00:00
Mathias Jakobsen
59b3b9b933 Merge pull request #12631 from overleaf/ae-readonly-focus
[cm6] Prevent the editor being focused when read-only

GitOrigin-RevId: 7de9f2df2421b57b3315d59d640f7c8b46caf178
2023-04-21 08:02:56 +00:00
Mathias Jakobsen
c2292a8567 Merge pull request #12677 from overleaf/ae-codemirror-view-upgrade
[cm6] Upgrade CodeMirror dependencies

GitOrigin-RevId: cc973b1c5b23eca0fc93a9b3a970c832212e47af
2023-04-21 08:02:53 +00:00
Alf Eaton
924012e21f [cm6] Avoid overwriting themed syntax highlighting colours when editing Markdown (#12648)
GitOrigin-RevId: ed5d558544839978862004a8b7feb80806a2100d
2023-04-19 08:03:04 +00:00
Alf Eaton
5717f51042 Merge pull request #12643 from overleaf/ae-initial-active-line-highlight
[cm6] Fix initial active line highlight

GitOrigin-RevId: 54de6a176e826ed7d7f1016ba6cee7a8803f0be4
2023-04-19 08:02:53 +00:00
Alf Eaton
63b2064420 [cm6] Add scrollIntoView when commands are dispatched (#11678)
GitOrigin-RevId: be005885330b9b29c7ddbfeacaec0a41d96e5e25
2023-04-17 08:05:33 +00:00
Mathias Jakobsen
4b2cc907e2 [cm6] Change Emacs commands to visual-line-mode (#12523)
* [cm6] Change Emacs commands to visual-line-mode
* [cm6] Change line deletion commands to visual line mode

GitOrigin-RevId: 7a4f3d66bec611de410b6c1fbafbfe33b974e37b
2023-04-17 08:05:08 +00:00
Alf Eaton
359255b820 [cm6] Use a modified fork of the closeBrackets extension (#12573)
GitOrigin-RevId: a24020ed216cb10defff989f5876666c29889de2
2023-04-17 08:04:43 +00:00
Alf Eaton
dda9230c6c [rich text] Add "Insert Citation" and "Insert Cross-reference" buttons (#12529)
GitOrigin-RevId: fde2f1a281318afede138ccae12f73ade3fa9f65
2023-04-17 08:04:34 +00:00
Alf Eaton
a8ed6b65e1 [cm6] Improve "vertical overflow" handling (#12405)
* Avoid setting style on the editor view whenever overflowPaddingState changes
* Round values in recalculateScreenPositions
* Refactor ignoreGeometryChangesUntil slightly
* Restore the original value

GitOrigin-RevId: 75c57be21dd16a748c0d9b14058386849a80b831
2023-04-17 08:04:18 +00:00
Alf Eaton
ab10fd99f5 Add CodeMirror dev tools extension (#12142)
GitOrigin-RevId: 148a0fba5faf6dc8f638fcb4666e2fda6c5c6c40
2023-04-17 08:04:09 +00:00
Alf Eaton
161decd67d Upgrade @codemirror/view (#12574)
* Upgrade @codemirror/view
* Disable emptyLineFiller extension

GitOrigin-RevId: 57ce4194ece0ea448e24184f0b3a3e13352cb014
2023-04-17 08:04:00 +00:00
Tim Down
7f37ba737c Move source editor out of module (#12457)
* Update Copybara options in preparation for open-sourcing the source editor

* Move files

* Update paths

* Remove source-editor module and checks for its existence

* Explicitly mention CM6 license in files that contain code adapted from CM6

GitOrigin-RevId: 89b7cc2b409db01ad103198ccbd1b126ab56349b
2023-04-13 08:40:56 +00:00