mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-01 17:07:06 +03:00
undo: for an automatic hard-wrap, store the correct previous buffer size
The SPLIT_BEGIN item gets tucked underneath the ADD item on the top of
the undo stack. Thus: that SPLIT_BEGIN item should copy the 'wassize'
of the ADD item instead of storing the current buffer size.
This fixes https://savannah.gnu.org/bugs/?57832.
Bug existed since the undo functionality was added, and existed
in this form since version 2.3.5, commit be10c2a4
.
This commit is contained in:
parent
5c07a747bb
commit
12e5c2f07d
@ -1142,6 +1142,7 @@ void add_undo(undo_type action, const char *message)
|
||||
* SPLIT_BEGIN item underneath that action's undo item. Otherwise,
|
||||
* just add the new item to the top of the undo stack. */
|
||||
if (u->type == SPLIT_BEGIN) {
|
||||
u->wassize = openfile->undotop->wassize;
|
||||
u->next = openfile->undotop->next;
|
||||
openfile->undotop->next = u;
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user