vscode-ibmi
vscode-ibmi copied to clipboard
Sometimes strange visual effect with source dates enabled
Sometimes the editor windows acts strange (with source dates enabled). Scrolling out and in again to this line shows it normal again.
- QCCSID: 1141
- Features:
- git: false
- grep: false
- tn5250: false
- setccsid: true
- GENCMDXML.PGM: false
- QZDFMDB2.PGM: true
- iconv: true
- attr: true
- SQL enabled: false
- Source dates enabled: true
Variants
{
"american": "%23@$",
"local": "%23§$"
}
Errors:
[
{
"command": "/QOpenSys/usr/bin/qsh",
"code": 1,
"stderr": "CPC2206: Eigentumsrecht für Objekt QRNFER in QTEMP Art *USRSPC geändert.\nCPC2206: Eigentumsrecht für Objekt QRNFEF in QTEMP Art *USRSPC geändert.\nRNS9308: Umwandlung gestoppt. Fehler mit Bewertungsstufe 30 im Programm gefunden.\nCPC2206: Eigentumsrecht für Objekt RETURNCODE in QTEMP Art *DTAARA geändert.\nCPC0904: Datenbereich RETURNCODE in Bibliothek QTEMP erstellt.\nRNS9310: Umwandlung fehlgeschlagen. Programm AC17131 in Bibliothek EM01SRC nicht erstellt.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art *USRSPC geändert.",
"cwd": "/home/HEL"
},
{
"command": "/QOpenSys/usr/bin/qsh",
"code": 1,
"stderr": "CPC2206: Eigentumsrecht für Objekt QRNFER in QTEMP Art *USRSPC geändert.\nCPC2206: Eigentumsrecht für Objekt QRNFEF in QTEMP Art *USRSPC geändert.\nRNS9308: Umwandlung gestoppt. Fehler mit Bewertungsstufe 30 im Programm gefunden.\nCPC2206: Eigentumsrecht für Objekt RETURNCODE in QTEMP Art *DTAARA geändert.\nCPC0904: Datenbereich RETURNCODE in Bibliothek QTEMP erstellt.\nRNS9310: Umwandlung fehlgeschlagen. Programm AC17131 in Bibliothek EM01SRC nicht erstellt.\nCPC2206: Eigentumsrecht für Objekt QZSHSYSTEM in QTEMP Art *USRSPC geändert.",
"cwd": "/home/HEL"
},
]
Weird!
Any notes on how I can recreate this? We have a PR in the works which make fix this also.
This happens with me as well. It happens especially when deleting lines of code with the delete key. I normally will delete lines of code with the backspace. It seems to be work better. But occasionally it will happen just paging down through the code. When it gets bad, I normally restart VSCode and it will reset
@Hadkins2 I will look into source dates being affected with the source dates. Thanks!
This also happens.

@fheldt @Hadkins2 Is this still an issue?
@fheldt @Hadkins2 Is this still an issue?
I haven't seen the source date becoming 2 digits issue lately, but the source date disappearing and the code line shifted left happened to me today. It was the last line of source in the member.
Howard
@Hadkins2 may I recommended changing edit mode to diff mode in the connection settings?
The issue described by @Hadkins2 just happened to me today, with Code for IBM i 1.7.11. It's not that the gutter date becomes 2 digits. It's that the gutter somehow effectively moves over to the left by some amount of pixels (or other arbitrary graphical measure) and there isn't a way to bring it all the way back into the displayable area:

I think this is related to horizontal scrolling somehow. Normally, when you have super-long lines (in other files, not handled by Code for IBM i) and you cursor your way far to the right, the "viewport" moves to the right automatically, to keep the cursor in view. If you get to the end of such a line and then right-arrow one more time to go to the beginning of the next line, the viewport resets so that the leftmost part of your file is visible.
But when the source date gutter is involved, sometimes this doesn't quite work.
Incidentally, I feel like horizontal scrolling in general (at least with source date gutter enabled, which is the only way I ever use it) is a bit wonky with Code for IBM i. I am always surprised whenever the viewport jumps to the right for any reason, because the lines of code are never anywhere near the right edge of my screen. There aren't any source files defined with wide enough records to ever trouble the horizontal capacity of my editing window. Yet there is this unsettling jumping.
I can only imagine it has something to do with the editing process. In the course of deleting, say, you could wind up joining two lines. Of course it's only a temporary situation, but for that short time where you have multiple lines' worth of content on one line, it may indeed be too long to fit on the screen, and then the chances of odd things happening goes up dramatically. I suspect this is the case even when the cursor isn't anywhere near the right edge of the screen, because, as I said, I am always surprised when it happens. Even for those brief moments when I may have too much content on one line, I don't think I ever hit the End button or do anything else that should necessitate the viewport having to move horizontally at all. With the cursor still well within the range of columns that would fit in the normal viewing area, I press Enter to restore the situation to all lines being a normal length.
Oh, and now in the course of writing this comment, I switched back to VS Code and the gutter is fully visible again. I didn't do anything in VS Code, just switched back to it after a time away from it. It is a graphical rendering thing. For me, this underscores just how brittle and finicky (and yet kind of awesome) the whole gutter concept is (in VS Code intrinsically, not necessarily anything Liam has control over). I wonder if this is the kind of thing that Theia, with its theoretically deeper UI customizability, would allow to be implemented in a more straightforward and reliable way.
Sorry for my extended ramblings. If you've made it to the end, thanks for reading!
@jkyeung Are you on Windows? I run with the gutter on always and I've never seen it 😞
Yes, I'm seeing it in Windows 11. It might be hard to reproduce. I can cause the weirdness at will right now in one member that I have open (has been open for a while, with lots of unsaved edits) but not in another (that I only just opened).
In the one that's having the issue, I can cause the weirdness as follows:
- Put the cursor on column 1.
- Select a bunch of lines by holding down Shift and pressing the down arrow a few times, so the cursor is still on column 1.
- Press Delete.
Expected behavior: The selected lines are deleted, the cursor stays on column 1, the viewport stays where it is, and the source dates stay where they are.
Actual behavior (in one member): The selected lines are deleted, the cursor stays on column 1, the viewport jumps far to the right - which means I can't even see the cursor anymore! - and when I move the cursor just to get the viewport to come back to the left, the source dates are obscured except for a little bit of the rightmost digit(s).
Actual behavior (in a different member): Same as expected behavior.
Edit: It seems sensitive to the number of lines deleted, or something. I'm noticing I can't always get the weirdness to happen in the problematic member. Deleting more lines seems to increase the chance that it happens.