diff -r 0572a215bd2f -r 5994b80b8760 eric6/HexEdit/HexEditUndoStack.py --- a/eric6/HexEdit/HexEditUndoStack.py Sun Apr 11 16:53:48 2021 +0200 +++ b/eric6/HexEdit/HexEditUndoStack.py Sun Apr 11 18:45:10 2021 +0200 @@ -89,11 +89,13 @@ """ result = False - if self._cmd != HexEditCommand.RemoveAt: - if command._cmd == HexEditCommand.Overwrite: - if command._pos == self._pos: - self._newByte = command._newByte - result = True + if ( + self._cmd != HexEditCommand.RemoveAt and + command._cmd == HexEditCommand.Overwrite and + command._pos == self._pos + ): + self._newByte = command._newByte + result = True return result