ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
370 stars 52 forks source link

Improved Split Lines bugs with Batch File scheme #473

Open ProgerXP opened 8 months ago

ProgerXP commented 8 months ago

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:

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 commented 3 months ago

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.