More accurate initialization of undo feature structures

This commit is contained in:
Alexander S. Aganichev 2001-10-21 17:44:12 +00:00
parent 330a200f65
commit 14faad593f

View File

@ -2472,6 +2472,7 @@ void UndoStack::PushItem(uint action, Line* __line, uint __col, uint __len) {
case EDIT_UNDO_VOID: case EDIT_UNDO_VOID:
case EDIT_UNDO_INS_CHAR: case EDIT_UNDO_INS_CHAR:
last_item->line = __line ? __line : currline; last_item->line = __line ? __line : currline;
last_item->data.char_int = NUL;
break; break;
case EDIT_UNDO_DEL_CHAR: case EDIT_UNDO_DEL_CHAR:
case EDIT_UNDO_OVR_CHAR: case EDIT_UNDO_OVR_CHAR:
@ -2488,6 +2489,7 @@ void UndoStack::PushItem(uint action, Line* __line, uint __col, uint __len) {
break; break;
case EDIT_UNDO_CUT_TEXT: case EDIT_UNDO_CUT_TEXT:
last_item->line = __line; last_item->line = __line;
last_item->data.text_ptr = NULL;
break; break;
case EDIT_UNDO_INS_TEXT: case EDIT_UNDO_INS_TEXT:
case EDIT_UNDO_WRAP_TEXT: case EDIT_UNDO_WRAP_TEXT:
@ -2514,6 +2516,8 @@ void UndoStack::PushItem(uint action, Line* __line, uint __col, uint __len) {
break; break;
case EDIT_UNDO_POP_LINE: case EDIT_UNDO_POP_LINE:
last_item->line = currline; last_item->line = currline;
last_item->data.line_ptr = NULL;
break;
} }
} }