Spoofing a line number for the redoing of an INSERT, because
'u->mark_begin_lineno' is being used as the length of the insertion. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5375 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
08e5eea5b6
commit
3059e16c25
|
@ -1,3 +1,8 @@
|
|||
2015-10-28 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/text.c (do_redo): For an INSERT, 'u->mark_begin_lineno' is not
|
||||
an actual line number, so spoof it. It can be spoofed, because 'f'
|
||||
is not used for the INSERT case. This fixes Savannah bug #45524.
|
||||
|
||||
2015-10-27 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/move.c (do_next_word): Rewrite this function to use the same
|
||||
logic as do_prev_word(), reducing its number of lines to half.
|
||||
|
|
|
@ -639,7 +639,7 @@ void do_redo(void)
|
|||
return;
|
||||
}
|
||||
|
||||
filestruct *f = fsfromline(u->mark_begin_lineno);
|
||||
filestruct *f = fsfromline(u->type == INSERT ? 1 : u->mark_begin_lineno);
|
||||
if (!f) {
|
||||
statusbar(_("Internal error: can't match line %d. Please save your work."), u->mark_begin_lineno);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue