Index: src/nano.c =================================================================== --- src/nano.c (revisión: 4959) +++ src/nano.c (copia de trabajo) @@ -1577,8 +1577,8 @@ /* The input buffer. */ static size_t kbinput_len = 0; /* The length of the input buffer. */ - bool cut_copy = FALSE; - /* Are we cutting or copying text? */ + bool preserve = FALSE; + /* Preserve the contents of the cutbuffer? */ const sc *s; bool have_shortcut; @@ -1674,7 +1674,7 @@ || s->scfunc == do_copy_text || s->scfunc == do_cut_till_end #endif ) - cut_copy = TRUE; + preserve = TRUE; if (s->scfunc != 0) { const subnfunc *f = sctofunc((sc *) s); @@ -1682,8 +1682,10 @@ print_view_warning(); else { #ifndef NANO_TINY - if (s->scfunc == do_toggle_void) + if (s->scfunc == do_toggle_void) { do_toggle(s->toggle); + preserve = TRUE; + } else #endif { @@ -1707,9 +1709,9 @@ } } - /* If we aren't cutting or copying text, blow away the text in the - * cutbuffer upon the next cutting action. */ - if (!cut_copy) + /* If we aren't cutting or copying text, and the key wasn't a toggle, + * blow away the text in the cutbuffer upon the next cutting action. */ + if (!preserve) cutbuffer_reset(); return input;