fix: ruler improvements for fixed-format SQL continuation, stale decoration, and Source Change Date overlap#495
Open
bobcozzi wants to merge 3 commits into
Conversation
83ea055 to
23c8efd
Compare
worksofliam
requested changes
May 7, 2026
Member
worksofliam
left a comment
There was a problem hiding this comment.
good change but small issue
| // Tracks the last RPG fixed-format editor that had the ruler painted, so it can | ||
| // be cleared when focus moves to a webview (e.g. Ctrl+Shift+F4 prompter) or to | ||
| // a non-RPG file, where onDidChangeTextEditorSelection never fires. | ||
| let lastRpgleEditor: import('vscode').TextEditor | undefined = undefined; |
Member
There was a problem hiding this comment.
we don't use import like this in this project. Add it in an import at the top of the file
…ration, and Source Change Date overlap - Skip Shift+F4 ruler on legacy embedded SQL continuation lines (col 7 = '+') - Clear ruler immediately when active editor changes (e.g. Cmd+Shift+F4 webview opens) so the decoration does not remain frozen over the source - Cap ruler background width at 80ch to avoid painting over Source Change Date columns that IBM i source physical files carry beyond column 80
23c8efd to
d994c6b
Compare
Member
|
@bobcozzi very sorry, but I just merged a PR that altered the same file (and added some OPM support). If you fix the conflicts one more time, I can test and merge. |
Contributor
Author
|
Should be good now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three related fixes to the Shift+F4 fixed-format spec ruler in
columnAssist.ts.Fixed
1. Ruler incorrectly shown on legacy embedded SQL continuation lines
Column 7 =
+marks a C spec SQL continuation line (e.g......C+ FROM qiws.qcustcdt;). The ruler guard already skipped*(comments) and/(directives) but not+, so the C-spec ruler was incorrectly painted on those lines. Extended the guard to return early for+as well.2. Ruler persists when the Cmd+Shift+F4 Column Assistant opens
onDidChangeTextEditorSelectiondoes not fire while a webview panel has focus, so the ruler decoration stayed frozen on the source line until the user moved the cursor after closing the prompter. Added awindow.onDidChangeActiveTextEditorsubscription that immediately clears the ruler from the last RPG editor whenever focus moves away (to a webview or another file).3. Ruler background overlaps Source Change Date columns
The ruler decoration used
width: 100vwwith an opaquebackground-color, which painted over the Source Change Date text that IBM i source physical files carry in columns 81–92. Changed the width to80chto cap the background at the fixed-format source width.