diff --git a/docs/notework.txt b/docs/notework.txt index 6aee34f..6a20916 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,10 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Fixed undo of the last removed line. + +- Improved a bit speed for long messages handling. + - When deleting marked messages the pointer moved always on the previous message instead of the next in movement direction. diff --git a/golded3/geedit.cpp b/golded3/geedit.cpp index 3c96577..304e7cc 100644 --- a/golded3/geedit.cpp +++ b/golded3/geedit.cpp @@ -2595,8 +2595,16 @@ void UndoStack::PlayItem() { uint curr_row_num = thisrow; uint curr_col_num = col; - currline = (item->action & PREV_LINE) ? item->line->next : item->line; + if((item->action & PREV_LINE) and item->line->next) + currline = item->line->next; + else + currline = item->line; editor->getthisrow(currline); + + int _maxrow = maxrow; + if((item->action & PREV_LINE) and not item->line->next) + _maxrow--; + col = item->col.num; if(curr_row_num != thisrow) { @@ -2617,7 +2625,7 @@ void UndoStack::PlayItem() { } } else { - if(row < maxrow) + if(row < _maxrow) curr_row_num++, row++; else { Line* l = currline; @@ -2636,6 +2644,10 @@ void UndoStack::PlayItem() { if(undo_ready) { + if((item->action & PREV_LINE) and not item->line->next) { + row++; thisrow++; curr_row_num++; + } + bool in_batch; // Keep undoing until item with no BATCH_MODE flag is reached.