I’ve noticed in the query editor, expression editor and script editor an annoying bug that happens only with indented lines: there is some “misalignment” between one see and the actual text, for example, here I want to select the word “aisle” and paste it at the bottom, I select it, press CTRL-C, go to the bottom and press CTRL-V and the pasted text is another string, as if I had selected it incorrectly. This misalingment affects copy-paste and at times normal typing becomes difficult.
I am using v 8.1.47
I am not sure if it might be related to my monitor resolution that has a 200% scaling:
Yup, mainly gets me in the script console, especially if I have a gateway scheduled that I want to run a quick test on, copy it from the scheduled scripts to script console to run it and always have to highlight all and tab it back.
I’m pretty sure @paul-griffith has done work on this in 8.1, but I can’t get the right term to find it on the forum search.
Soon I’ll be prepping for 8.1 to 8.3 upgrades, so I’ll see if things have changed for the better in that environment.
So, there's some history here, but my current expectation is that expression and some query editors (i.e. the ones in Vision as pictured here) would be affected, because they're backed by a Java Swing code editor component from Jidesoft that's always been affected by DPI scaling in a weird way (presumably because they're doing hokey internal string width calculation stuff).
But more "modern" code editors across the designer use a different code editor, including all extension function editors, the project script library, and the script console (and the SQL editor in the named query workspace). I was not aware of that library being susceptible to this DPI scaling bug, and in fact there's been a task for a long time to swap all the other internal editors (including the expression editor) to this alternate editor [1] for consistency.
I think that what the OP is describing is different than what you're describing, @Matrix_Engineering, where already indented code pasted into a (modern) script editor attempts to automatically balance the indentation, and basically never gets it right. I made an attempt to improve that in the middle of 8.1, but it's otherwise the same from 8.1 to 8.3.
Due to this issue, for queries and expressions I try to always use spaces, not tabs, to indent. This does not make the issue go away completely, but it sure helps.