diff --git a/ChangeLog b/ChangeLog index 57911f576bb9a6f00794a9da8f06abea06b672c0..16a83841ed557fef04fc6d1ff80e673b919fd123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-06-17 Mark Majeres <mark@engine12.com> + * src/text.c (do_undo, do_redo): After an undo or redo, update the + 'placewewant' (the desired horizontal position of the cursor). + 2014-06-17 Benno Schulenberg <bensberg@justemail.net> * src/text.c (do_undo, do_redo): Remove obsolete boolean variable. diff --git a/src/text.c b/src/text.c index 404df9e65e3b371ac11c40404f95c6a91d56d4d7..e8a97d298053b66f15b3845f76a3a38ecd85fe34 100644 --- a/src/text.c +++ b/src/text.c @@ -558,6 +558,7 @@ void do_undo(void) renumber(f); openfile->current_undo = openfile->current_undo->next; openfile->last_action = OTHER; + openfile->placewewant = xplustabs(); set_modified(); } @@ -611,7 +612,6 @@ void do_redo(void) free(f->data); f->data = data; openfile->current_x = u->begin; - openfile->placewewant = xplustabs(); goto_line_posx(u->lineno, u->begin); break; case ENTER: @@ -674,6 +674,7 @@ void do_redo(void) openfile->current_undo = u; openfile->last_action = OTHER; + openfile->placewewant = xplustabs(); set_modified(); } #endif /* !NANO_TINY */