tinymist/crates
ParaN3xus 3b6de80a2f
fix: correct parent_last_loc for heading children in folding ranges (#2123)
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.
2025-09-24 00:24:31 +08:00
..
crityp fix: update cargo metadata and crate release script (#2073) 2025-08-25 03:03:55 +08:00
sync-lsp docs: document all public items in rust codebase (#2058) 2025-08-21 12:50:03 +08:00
tinymist fix: extend origin check for vscode servers (#2106) 2025-09-14 08:08:30 +08:00
tinymist-analysis dev: drop if_chain and collapse if statements (#2097) 2025-09-01 16:46:54 +08:00
tinymist-assets docs: document all public items in rust codebase (#2058) 2025-08-21 12:50:03 +08:00
tinymist-cli feat: enhance CLI and argument documentation (#2072) 2025-09-03 17:02:42 +08:00
tinymist-dap feat: bump edition of most crates to rust 2024 (#2042) 2025-08-18 16:48:41 +08:00
tinymist-debug dev: drop if_chain and collapse if statements (#2097) 2025-09-01 16:46:54 +08:00
tinymist-derive build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00
tinymist-l10n build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00
tinymist-lint dev: drop if_chain and collapse if statements (#2097) 2025-09-01 16:46:54 +08:00
tinymist-package build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00
tinymist-project feat: enhance CLI and argument documentation (#2072) 2025-09-03 17:02:42 +08:00
tinymist-query fix: correct parent_last_loc for heading children in folding ranges (#2123) 2025-09-24 00:24:31 +08:00
tinymist-render fix: eliminate clippy warnings (#2036) 2025-08-18 12:42:03 +08:00
tinymist-std build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00
tinymist-task build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00
tinymist-tests feat: bump edition of most crates to rust 2024 (#2042) 2025-08-18 16:48:41 +08:00
tinymist-vfs build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00
tinymist-world feat: enhance CLI and argument documentation (#2072) 2025-09-03 17:02:42 +08:00
typlite build: update readme docs (#2114) 2025-09-12 00:50:56 +08:00
typst-preview feat: enhance CLI and argument documentation (#2072) 2025-09-03 17:02:42 +08:00
typst-shim build: bump version to 0.13.24 (#2085) 2025-08-26 16:15:03 +08:00