Skip to content
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

Improved Split Lines bugs with Batch File scheme #473

Open
ProgerXP opened this issue Jan 12, 2024 · 1 comment
Open

Improved Split Lines bugs with Batch File scheme #473

ProgerXP opened this issue Jan 12, 2024 · 1 comment
Assignees
Labels

Comments

@ProgerXP
Copy link
Owner

#320 enabled, F12 -> Batch File, paste this document, Ctrl+A, Ctrl+I:

rem foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
rem
rem xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
rem
rem foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
rem foo

Issues:

  • Empty line appears after 3rd rem, and another rem appears after it (which wasn't present in the original nor is required for line wrapping)
  • Stray m appears after the extraneous rem (the first point)
  • The long xxxx... line is put on a separate line rather than being left alone on its own rem-prefixed line (since xxxx... cannot be broken and wrapped)
  • Last two lines are just all wrong: one starts with em em rather than rem, then goes an empty rem line and the rest of it goes on the separate line without the rem prefix
  • The last line in the output has stray em near the end

Expected output:

rem foo foo ...
rem foo foo ...
rem foo foo ...
rem
rem xxxx...
rem
rem foo foo...
rem foo foo...
rem foo foo...

Note: the purpose of rem foo (last input line) is to confirm that it's correctly joined with the preceding line - something that doesn't happen with this simple document ([ ] = selection):

[rem foo
rem foo]

I suspect there's some buffer overrun due to the comment prefix being 4 characters in this scheme since I don't see this problem with JavaScript or INI. Do we have some hardcoded limit on the prefix length?


Update: actually, one of these problems does appear in other schemes (JS/INI):

; foo
;
; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The output must be the same but it gets an empty ; line before the long line.

@ProgerXP
Copy link
Owner Author

Issue with Config File (INI):

# XXXXXXX XXXXXX
# 1. XX
(blank line at the end)

Ctrl+A, Ctrl+I - Notepad 2e will either crash or produce lots of empty # lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants