Bug in MODDED version of notepad2 (code folding)
Found a simple but bad bug today in MODIFIED version of notepad2 (code folding).
It caused me a small heart attack ;)
Bug is in both versions (based on 3.1.21 and 4.0.22-beta5)
It may delete data and you may not notice it before it’s to late.
If that happens, either way:
a) you almost have a heart attack [at that very moment, at that end of a day, at the end of year... ]
b) you cry like a baby [soon after you save and upload amd press F5]
c) somebody else cries like a baby (eventually)
d) you undo for a some reason and never know what didn’t hit you (unhit you? so… what has been hit CAN be unhit!)
e) you “experience” the bug, save, you almost have a heart attack, become irritated, you scratch your head and reopen the (backup)file, re-experience the bug, see what hit you, relax, put a band-aid on smth, and write a bug report
f) e without “write a bug report”, cause you’re a “bad motherfucker”
d) f and stop using notepad2 cause you’re a “sad motherfucker”
Mmm, got carried away a bit…
Bug Specs (or “how to reproduce the bug” if you like):
1. if a line that starts the foldable block
2. (and that block is folded)
3. is joined with a previous non-empty line (press delete at the end of “previous line” or press backspace at the start of the “1st line of a foldable block which is folded” :)
4 THEN the whole block is deleted, except that first visible line
While testing the bug, I had an idea (“suspected” to find more bugs). And so I did. So there may be more similar bugs. So fixing the bugs is more the matter of following “some simple rules”.
Bug2 and Bug3 and bug4… Specs:
If you “Paragraph move” [shit+ctrl+up/down arrow] a line into folded block or move that line inside the block then block is “opened” (+ -> -) but only that line, which you moved is actually shown. Move it more… aw shit how to describe it … then the next line appers. and the next… and the next…
If you “Paragraph move down” the first line of collapsed block then the block is erased, except the first line that WAS hidden.
…
…
Test code:
<?php
// POS-1
if() {
// POS-2
} // POS-3
else {
// POS-4
}
?>
Image samples [cause I'm not really a native English speaker] and I’m fucking tired [I hope I got it right... ]:
So please leave a comment if it is fixed, so I can add a link to fixed version.
Links to sources:
- Original notepad2: http://www.flos-freeware.ch/
- Modded version with described bug: http://code.kliu.org/misc/notepad2/
ktnxbye! :)
Loading image
Click anywhere to cancel
Image unavailable
