New Member

Group: Members
Posts: 14
Member No.: 24334
Joined: 10-July 09

|
Hi,
I discovered this bug while attempting to code a mass change (i.e. replace all) routine that I was writing for the HiEdit control using AutoHotkey. I was able to duplicate the problem using HiEditor v4.0.0.2 so I'm fairly certain that it's not just me.
The problem is that the HiEdit control gets lost (loses track of what's what) when deleting after a mass change (replace all).
The problem is easy to duplicate...
Open the HiEditor to a new document. Make sure that the line numbers bar is showing.
Create a line with a short string. I used "abcdef". Duplicate this line a bunch of times - anywhere from 80 to 100 times or more.
Scroll back to the top and open the Find & Replace dialog (Ctrl+H). Replace the first three characters of the string in each line ("abc" in my example) with a much longer string ("abc123456789012345678901234567890" if you use my example) and click on the "Replace All" button. The "Replace All" function seems to work fine.
Next, scroll back to the top of the document and select all but the first 2 lines and hit the Delete key to delete the selected lines. This is where we first get an indication of a problem. Note that line numbers bar is showing line number next to lines that shouldn't exist any more.
Next, save this file to any junk file name. Close the current file and open the junk file you just saved. You should have just 2 lines of stuff but instead you have a bunch of lines that shouldn't be there. This same test without the "select and delete" step seems to work OK.
Thank you for your consideration.
20090711 Addendum: This "bug" can occur after a large number (>5?) of singe replace requests are performed repeatedly. To duplicate this error, perform the same test as above except instead of clicking the "Replace All" button, click on the "Replace" button repeatedly until all items have been replaced.
|