Notepad2e
Notepad2e copied to clipboard
Improved Split Lines bugs with Batch File scheme
#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 anotherremappears after it (which wasn't present in the original nor is required for line wrapping) - Stray
mappears after the extraneousrem(the first point) - The long
xxxx...line is put on a separate line rather than being left alone on its ownrem-prefixed line (sincexxxx...cannot be broken and wrapped) - Last two lines are just all wrong: one starts with
em emrather thanrem, then goes an emptyremline and the rest of it goes on the separate line without theremprefix - The last line in the output has stray
emnear 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.
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.