amagnasco / xwpe

Upload of an abandoned ncurses-based programming environment
http://www.identicalsoftware.com/xwpe/
GNU General Public License v2.0
29 stars 6 forks source link

Search/replace in combination with undo/redo sometimes gives wrong results #83

Open gbonnema opened 7 years ago

gbonnema commented 7 years ago

The way to see the error:

  1. Open the file "COPYING"
  2. Do 2 search/replaces with default options in this order: 2a. Change "software" to "hardware" 2b. Change "sure" to "most certain"
  3. Do 2 undo's and 1 redo. 3a. The result is one change of "software" to "hardwareware". 3b. Expected result is a change of "software" to "hardware".
  4. Do an undo: 4a. The result is a change from "hardwareware" to "soft"

Remark that this error does not occur with only 1 change. Also, the length of the 2nd searchstring seems to correlate to the error in the 1st search string.

Needs investigation.

P.S. A reference test with the original code is not useful, because that contains a lot more errors than the corrected (new) code.

This error was found at pullrequest #84.