I suspect that since the successful changes of search and replace #78, undo functions differently. When undoing a replace, the undo first shows removal of the replaced string (i.e. no string is left) and on the next c-u returns with the string that was replaced.
This did not happen in the original code. This needs further investigation and comparison with the original code.
EDIT: Also, once undo is done on one replace, the redo was lost. This was not the case when solving #78. Commit responsible was reverted.
I suspect that since the successful changes of search and replace #78, undo functions differently. When undoing a replace, the undo first shows removal of the replaced string (i.e. no string is left) and on the next c-u returns with the string that was replaced.
This did not happen in the original code. This needs further investigation and comparison with the original code.
EDIT: Also, once undo is done on one replace, the redo was lost. This was not the case when solving #78. Commit responsible was reverted.