Fixed undo of the last removed line
This commit is contained in:
parent
de9f258747
commit
ab55ba928f
@ -12,6 +12,10 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
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
|
- When deleting marked messages the pointer moved always on the
|
||||||
previous message instead of the next in movement direction.
|
previous message instead of the next in movement direction.
|
||||||
|
|
||||||
|
@ -2595,8 +2595,16 @@ void UndoStack::PlayItem() {
|
|||||||
|
|
||||||
uint curr_row_num = thisrow;
|
uint curr_row_num = thisrow;
|
||||||
uint curr_col_num = col;
|
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);
|
editor->getthisrow(currline);
|
||||||
|
|
||||||
|
int _maxrow = maxrow;
|
||||||
|
if((item->action & PREV_LINE) and not item->line->next)
|
||||||
|
_maxrow--;
|
||||||
|
|
||||||
col = item->col.num;
|
col = item->col.num;
|
||||||
|
|
||||||
if(curr_row_num != thisrow) {
|
if(curr_row_num != thisrow) {
|
||||||
@ -2617,7 +2625,7 @@ void UndoStack::PlayItem() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(row < maxrow)
|
if(row < _maxrow)
|
||||||
curr_row_num++, row++;
|
curr_row_num++, row++;
|
||||||
else {
|
else {
|
||||||
Line* l = currline;
|
Line* l = currline;
|
||||||
@ -2636,6 +2644,10 @@ void UndoStack::PlayItem() {
|
|||||||
|
|
||||||
if(undo_ready) {
|
if(undo_ready) {
|
||||||
|
|
||||||
|
if((item->action & PREV_LINE) and not item->line->next) {
|
||||||
|
row++; thisrow++; curr_row_num++;
|
||||||
|
}
|
||||||
|
|
||||||
bool in_batch;
|
bool in_batch;
|
||||||
|
|
||||||
// Keep undoing until item with no BATCH_MODE flag is reached.
|
// Keep undoing until item with no BATCH_MODE flag is reached.
|
||||||
|
Reference in New Issue
Block a user