-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No warning of truncated lines when saving to source member #1172
Comments
@chrjorgensen So we only know the source record length when SQL mode is enabled, which is how we provide the in-editor warning. Do we also provide a new user setting (enabled by default) which will disable saving of files when a line of code is over the record length? This would only be available when source dates are enabled. |
@worksofliam Source record length should always be considered, SQL mode enabled or not. No user setting should be necessary... a warning should always be shown when trimmed source exceeds record length, but if you want to give the user the ultimate responsibility, you could provide an option |
This is a false statement from myself. I believe we always know the record length, no matter if SQL is enabled or not. |
Possible dupe of #1347 |
@alanseiden A good tip, which I also started using a long time ago... 😃 |
hope this #1764 help in the meaning time. This only shows a warning message after the member is saved. Informing the user that some lines will be truncated before the saving process takes place would be ideal. Any efficient and effective way to do it? I was thinking of using the TextDocument and TextLine objects of the VS Code API. on the other hand, I like the idea #1172 (comment) to set a vertical ruler when a member is opened but this should consider the user can open members from different source files that have different record lengths, so each member should have they own vertical rule. VS Code let set a vertical rule for all documents and per language but not for a specific open document. |
Describe the bug
When a source member is opened in the editor and source lines longer than the maximum length are created, when the member is saved no warning is issued that lines will be truncated!
There is an indicator for lines exceeding the line length (the exceeding characters are underlined in read), but these lines may not be in the editor window. Or the exceeding characters may be too far to the right and thus outside the editor window.
I almost lost some source because of this - luckily I hadn't closed the editor when the compiler complained about garbage lines (phew)!
Expected behavior
There should be a pop-up warning the user that lines will be truncated if the user continues to save.
The text was updated successfully, but these errors were encountered: