tweaks: rearrange a case item, so that PASTE is always after CUT
Also, for a REPLACE, the 'head' point does not need to be updated, because a replacement does not change the cursor position.master
parent
1961c052c8
commit
8d87410c94
|
@ -1325,9 +1325,6 @@ void update_undo(undo_type action)
|
|||
case JOIN:
|
||||
break;
|
||||
case REPLACE:
|
||||
case PASTE:
|
||||
u->head_lineno = openfile->current->lineno;
|
||||
u->head_x = openfile->current_x;
|
||||
break;
|
||||
#ifdef ENABLE_WRAPPING
|
||||
case SPLIT_BEGIN:
|
||||
|
@ -1379,6 +1376,10 @@ void update_undo(undo_type action)
|
|||
u->head_x = strlen(bottomline->data);
|
||||
}
|
||||
break;
|
||||
case PASTE:
|
||||
u->head_lineno = openfile->current->lineno;
|
||||
u->head_x = openfile->current_x;
|
||||
break;
|
||||
case INSERT:
|
||||
u->tail_lineno = openfile->current->lineno;
|
||||
u->tail_x = openfile->current_x;
|
||||
|
|
Loading…
Reference in New Issue