1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-17 18:44:45 +02:00
joplin/packages/app-desktop/gui/NoteEditor/NoteBody/CodeMirror/utils
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
..
index.ts Desktop: Resolves #2242: Implements Sync-Scroll for Markdown Editor and Viewer (#5512) 2021-11-03 12:10:46 +00:00
types.ts All: Use Lerna to manage monorepo 2020-11-05 16:58:23 +00:00
useCursorUtils.test.ts Desktop: Fixes #4877: Incorrect list renumbering (#4914) 2021-06-07 10:17:46 +01:00
useCursorUtils.ts Desktop: Fixes #4877: Incorrect list renumbering (#4914) 2021-06-07 10:17:46 +01:00
useEditorSearch.ts Tools: Renamed package namespace from @joplinapp to @joplin 2020-11-07 15:59:37 +00:00
useExternalPlugins.ts Server: Add support for sharing notes via a link 2021-01-29 18:45:11 +00:00
useJoplinCommands.ts Plugins: Support executing codemirror commands from plugins when using execCommand (#5012) 2021-06-07 10:19:35 +01:00
useJoplinMode.ts Desktop: Split code block class in two (#5359) 2021-08-21 10:34:54 +01:00
useKeymap.ts macOS: Added Cmd+Backspace shortcut to delete line (#5478) 2021-09-19 11:32:58 +01:00
useLineSorting.ts All: Use Lerna to manage monorepo 2020-11-05 16:58:23 +00:00
useListIdent.ts Desktop: Resolves #4750 Disappearing text in markdown editor (#4781) 2021-04-01 21:39:42 -06:00
useScrollHandler.ts Desktop: Fixes #5708: Scroll positions are preserved (#5826) 2021-12-15 18:03:20 +00:00
useScrollUtils.ts All: Use Lerna to manage monorepo 2020-11-05 16:58:23 +00:00