undo: do not try to paste back an empty cutbuffer
Trying to do so would dereference a NULL pointer in copy_node(). This fixes https://savannah.gnu.org/bugs/?57915. Bug existed since before version 2.2.0.master
parent
1a28b08694
commit
0568f7a2b6
|
@ -762,7 +762,8 @@ void do_redo(void)
|
|||
case INSERT:
|
||||
redidmsg = _("insertion");
|
||||
goto_line_posx(u->head_lineno, u->head_x);
|
||||
copy_from_buffer(u->cutbuffer);
|
||||
if (u->cutbuffer)
|
||||
copy_from_buffer(u->cutbuffer);
|
||||
free_lines(u->cutbuffer);
|
||||
u->cutbuffer = NULL;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue