Respect inactive region column offsets when applying decorations - #14666
Respect inactive region column offsets when applying decorations#14666Prashant Kumar Rai (8prashant) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Preserves IntelliSense-provided column offsets when rendering inactive regions.
Changes:
- Adds optional start/end columns to
InputRegion. - Uses column offsets with backward-compatible zero-column fallbacks.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Hi Prashant Kumar Rai (@8prashant) . Thanks for the contribution! The native component of the C/C++ Extension doesn't currently pass down |
Actually, I needed to make another minor change, so I created: #14667 We can abandon this PR. This change should make it into 1.34.0 |
Summary
Fixes #12882
This change updates inactive-region decoration ranges to preserve the column offsets reported by the IntelliSense engine.
Previously, inactive regions were converted to whole-line VS Code ranges by forcing both start and end columns to
0. That caused lines containing active text before a preprocessor directive, such as a leading comment before#if 0, to be dimmed incorrectly.The decoration range now uses
startColumnandendColumnwhen they are present, while preserving the existing line-based fallback behavior for responses that do not include column data.Changes
startColumnandendColumnfields toInputRegion.0as the fallback column value for compatibility with line-only inactive region data.Testing
Tested locally on Windows.
yarn compileyarn lintyarn testgit diff --checkAlso manually verified in an isolated Extension Development Host using a repro case where a comment precedes
#if 0on the same line. The comment remains active while the inactive block is dimmed.