Index: src/text.c =================================================================== --- src/text.c (revision 5672) +++ src/text.c (working copy) @@ -188,6 +188,12 @@ filestruct *is_current = openfile->current; size_t is_current_x = openfile->current_x; + /* Remember where the cutbuffer is and then make it seem empty. */ + filestruct *wascutbuffer = cutbuffer; + filestruct *wascutbottom = cutbottom; + cutbuffer = NULL; + cutbottom = NULL; + /* Move the cursor to a word start, to the left or to the right. */ if (backward) do_prev_word(ISSET(WORD_BOUNDS), FALSE); @@ -205,6 +211,11 @@ /* Now kill the marked region and a word is gone. */ do_cut_text_void(); + + /* Discard the cut word and restore the cutbuffer. */ + free_filestruct(cutbuffer); + cutbuffer = wascutbuffer; + cutbottom = wascutbottom; } /* Delete a word leftward. */