mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
tweaks: remove two superfluous assignments
The variable 'last_action' is set at the end of these functions, serving to prevent a fresh action from being merged with an older action further down on the stack. Setting 'last_action' before exiting from undo()/redo() makes no sense. Also adjust a sideways related old Changelog item.
This commit is contained in:
parent
ed433f6af0
commit
fb372ed0a8
@ -3555,10 +3555,10 @@ GNU nano 2.1.4 - 2008.08.09
|
||||
* text.c (add_undo): Fix check for multi-line cut check skips adding other new legit events.
|
||||
|
||||
2008-07-23 Chris Allegretta <chrisa@asty.org>
|
||||
* text.c: Reset openfile-> to OTHER after an undo or redo so we don't
|
||||
mistakenly think this is an update when it's really an add. Also
|
||||
fix an extra ; after an if statement which makes nano try to free
|
||||
a struct which may be NULL.
|
||||
* text.c: Reset openfile->last_action to OTHER after an undo or redo
|
||||
so we don't mistakenly think this is an update when it's really an
|
||||
add. Also fix a mistaken ; after an if statement which made nano
|
||||
try to free a struct which might be NULL.
|
||||
|
||||
GNU nano 2.1.3 - 2008.08.04
|
||||
|
||||
|
@ -764,7 +764,6 @@ void do_undo(void)
|
||||
case SPLIT_END:
|
||||
goto_line_posx(u->lineno, u->begin);
|
||||
openfile->current_undo = openfile->current_undo->next;
|
||||
openfile->last_action = OTHER;
|
||||
while (openfile->current_undo->type != SPLIT_BEGIN)
|
||||
do_undo();
|
||||
u = openfile->current_undo;
|
||||
@ -939,7 +938,6 @@ void do_redo(void)
|
||||
case SPLIT_BEGIN:
|
||||
goto_line_posx(u->lineno, u->begin);
|
||||
openfile->current_undo = u;
|
||||
openfile->last_action = OTHER;
|
||||
while (openfile->current_undo->type != SPLIT_END)
|
||||
do_redo();
|
||||
u = openfile->current_undo;
|
||||
|
Loading…
Reference in New Issue
Block a user