1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-12 08:54:00 +02:00
joplin/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror
Kenichi Kobayashi 5c82e439a7
Desktop: Fixes #5708: Scroll positions are preserved (#5826)
Features:
- Scroll position is preserved when the editor layout changes.
- Scroll position is remembered when a note selection changes.

Modifications:
- The current Sync Scroll feature (in v2.6.2) is modified to use line-percent-based scroll positions.
- Scroll position translation functions, Viewer-to-Editor and Editor-to-Viewer, are separated into V2L / L2E and E2L / L2V respectively.
- The scrollmap is moved from gui/utils/SyncScrollMap.ts to note-viewer/scrollmap.js.
- IPC Protocol about the scrollmap becomes not necessary and is removed.
- Ignores non-user scroll events to avoid sync with incorrect scroll positions.
- When CodeMirror is not ready, setEditorPercentScroll() is waited.
- Fixes the bug: An incorrect scroll position is sometimes recorded.
- Since scroll positions become line-percent-based, the following incompatibilities of scroll positions are fixed:
  - Between Editor and Viewer.
  - Between Viewer Layout and Split Layout of Viewer
  - Between Editor Layout and Split Layout of Editor
2021-12-15 18:03:20 +00:00
..
styles Server: Add support for sharing notes via a link 2021-01-29 18:45:11 +00:00
utils Desktop: Fixes #5708: Scroll positions are preserved (#5826) 2021-12-15 18:03:20 +00:00
CodeMirror.tsx Desktop: Fixes #5708: Scroll positions are preserved (#5826) 2021-12-15 18:03:20 +00:00
Editor.tsx Desktop: Fixes #5708: Scroll positions are preserved (#5826) 2021-12-15 18:03:20 +00:00
Toolbar.tsx Chore: Moved app state to separate file 2021-09-04 18:11:29 +01:00