I’ve been using this script from Julian for years. It works fine for me in Xojo 2025r1.1, but appears to be broken in Xojo 2025r2.
The issue is this: if I write a line of code with a formatting “error,” it gets automatically corrected when I press the Return key to move to the next line. However, if I instead use the Mouse to click elsewhere in the Method, the line with the bad formatting remains unchanged.
Is anyone else having this experience?
P.S. I don’t know why Xojo has not made this automatic reformatting part of the language. There is a “Standard Format” menu choice that will clean up “selected text” in a code wndow, but this involves a lot of steps. With competitors now using Copilot in languages such as Python which do vastly more than simple reformatting, I think that the new Xojo user might be startled by the limitations of the product in this area.
The Code Editor setting Apply standardize format after ending line now, as its name suggests, only applies formatting when return is pressed on a line (instead of when the cursor is moved around with the arrow keys or mouse). Use Shift-Return on a code line to format it manually. (77139)
Thanks for the reference to 77139. This contains a discussion with a back and forth about whether standardized formatting should be applied if the cursor is moved with the mouse away from a “dirty” line. There are opposed opinions expressed on this topic. I happen to be a member of the group that want the Standard Formatting to be applied both when pressing Return or when moving the cursor to another location using the mouse.
In any case, Paul Lefevre, says that there will be a setting offered in Xojo 2025.r3 to allow the user to customize this behavior to be in accord with personal preference. I am content to wait for that.
Also I was mistaken in implying that this had to do with a particular Xojo script that I use. In fact, this behavior is proscribed by the Xojo IDE itself.