mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-22 20:35:20 +00:00
This PR fixes #1796 by correcting the parent_last_loc parameter passed to child elements when processing heading folding ranges. This is because heading's `lsp_range` only covers the line it is on, but it has children. This causes the `parent_last_loc` passed when recursively calling the `calc_folding_range` function to be incorrect: it is expected to be the end of the line before the next sibling heading, but actually it is the end of the current heading's line. This further prevents the correction of the heading's `folding_range` from working properly, ultimately causing the returned `folding_range` to retain the original `lsp_range`, which is just the heading line itself. The fix uses the already-calculated `folding_range.end_line` for headings when determining the `parent_last_loc` for child elements, ensuring consistency between the parent's actual folding boundary and the boundary passed to its children. |
||
|---|---|---|
| .. | ||
| crityp | ||
| sync-lsp | ||
| tinymist | ||
| tinymist-analysis | ||
| tinymist-assets | ||
| tinymist-cli | ||
| tinymist-dap | ||
| tinymist-debug | ||
| tinymist-derive | ||
| tinymist-l10n | ||
| tinymist-lint | ||
| tinymist-package | ||
| tinymist-project | ||
| tinymist-query | ||
| tinymist-render | ||
| tinymist-std | ||
| tinymist-task | ||
| tinymist-tests | ||
| tinymist-vfs | ||
| tinymist-world | ||
| typlite | ||
| typst-preview | ||
| typst-shim | ||