18 Commits

Author SHA1 Message Date
heoh
53a4ef7018 Fix markdown preview scroll crawls at EOF (fix #249278) 2025-06-12 03:56:11 +09:00
Matt Bierner
924ee8b4d8
Don't scroll sync to elements inside collapsed details sections (#176541)
Fixes #176538

Turns out that `getClientBoundingRect` returns weird bounds for elements inside of a collapsed details section
2023-03-08 21:06:26 +01:00
Ely Ronnen
5b79b91838
Fix #173869 marking active line for code elements too in markdown pre… (#173870)
Fix #173869 marking active line for code elements too in markdown preview
2023-02-08 20:25:54 +00:00
ibuky
9894ae8700
fix#171379 (#172175)
Co-authored-by: VTX0 <VTX0>
2023-02-01 00:35:02 +00:00
Matt Bierner
107d3ab28c
Fix markdown scrolling between elements being too jumpy (#166746)
Fixes #165055

We need to consider the distance between the end of the previous element and start of the next element. Previously we were taking distance from start of the previous to start of the next
2022-11-18 13:02:56 -08:00
Matt Bierner
4991cf2112
Remove console.log (#162784) 2022-10-05 15:25:52 -07:00
Matt Bierner
f4bf1f30a2
Skip ul and ol when highlighting selected markdown element (#161139)
Fixes #155552

For lists, the outer ul/ol always has the same source line as the first element in the list. We should prefer using the first element in the list when highlighting the active line

This also fixes a bug where scroll sync would stop working if you added lines to the doc. This was caused by `lineCount` getting out of sync as the document is being updated. I've removed this state and made the reveal logic more robust instead
2022-09-19 07:16:06 +02:00
Johannes Rieken
4a130c40ed
enable @typescript-eslint/member-delimiter-style, https://github.com/microsoft/vscode/issues/140391 2022-02-02 14:35:33 +01:00
Matt Bierner
8f672cac62
Use morphdom to reduce number of full page updates to md preview
This should help improve scroll sync and also reduce the number of times we go out to the network if images are in the preview
2021-11-01 15:33:00 -07:00
Takashi Tamura
a34e751b01
Fix scrolling of markdown preview. Close #65504 (#111094)
* Fix scrolling of markdown preview.

* Use scrollDisabledCount.

* Stop initializing scrollDisabledCount.

* Make scrollTo enough large to occur scroll events.

* Should resolve when the error event occurs.
2021-01-14 17:24:08 -08:00
Matt Bierner
b10335675f Improve scroll sync for nested markdown lists
Fixes #83735
2019-11-08 18:13:01 -08:00
Matt Bierner
45a64e2bdd Improve markdown scroll sync on fenced code blocks in md files 2019-11-02 15:28:01 -07:00
Salvador Cabrera
34339f92c4 Fix: Markdown Preview scroll remains same after clicking on some other link #78465
Improves the behavior on how markdown preview behaves when clicking a link
2019-08-19 09:35:06 -05:00
Matt Bierner
003521e715 Fix markdown preview restoring to wrong position on restart 2019-02-14 18:24:01 -08:00
Matt Bierner
cba84fba5e Take progress within element into account for markdown scroll sync
Fixes #65504
2019-01-02 14:36:16 -08:00
Matt Bierner
907924abc0 Reveal absolute top of markdown preview when scrolling to line 0
Fixes #61816
2018-10-25 11:57:50 -07:00
Matt Bierner
fe63c7e2f2 Reveal line 0 in editor when markdown preview scrolls to top
Fixes #61815
2018-10-25 11:57:50 -07:00
Matt Bierner
468dc867cd Rename markdown to markdown-language-features 2018-03-19 21:08:39 -07:00