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:
|
case JOIN:
|
||||||
break;
|
break;
|
||||||
case REPLACE:
|
case REPLACE:
|
||||||
case PASTE:
|
|
||||||
u->head_lineno = openfile->current->lineno;
|
|
||||||
u->head_x = openfile->current_x;
|
|
||||||
break;
|
break;
|
||||||
#ifdef ENABLE_WRAPPING
|
#ifdef ENABLE_WRAPPING
|
||||||
case SPLIT_BEGIN:
|
case SPLIT_BEGIN:
|
||||||
|
@ -1379,6 +1376,10 @@ void update_undo(undo_type action)
|
||||||
u->head_x = strlen(bottomline->data);
|
u->head_x = strlen(bottomline->data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PASTE:
|
||||||
|
u->head_lineno = openfile->current->lineno;
|
||||||
|
u->head_x = openfile->current_x;
|
||||||
|
break;
|
||||||
case INSERT:
|
case INSERT:
|
||||||
u->tail_lineno = openfile->current->lineno;
|
u->tail_lineno = openfile->current->lineno;
|
||||||
u->tail_x = openfile->current_x;
|
u->tail_x = openfile->current_x;
|
||||||
|
|
Loading…
Reference in New Issue