[PATCH] input: allow `recordmacro` and `runmacro` to continue cuts and copies
Benno Schulenberg <[email protected]> Sun, 15 Feb 2026 12:45:11 +0100
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <[email protected]> |
Starting the recording or replaying of a macro does not change anything
about the position of the cursor or the state of the buffer, so those
functions should not interrupt a series of cuts (^K) or copies (M-6).
This allows a macro to complete a series of cuts or copies that were
initiated manually (or by a previous macro).
This addresses https://savannah.gnu.org/bugs/?68046.
---
src/nano.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
index f5ca1383..8a9d7e3c 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1677,7 +1677,7 @@ void process_a_keystroke(void)
/* When not cutting or copying text, drop the cutbuffer the next time. */
if (function != cut_text && function != copy_text) {
#ifndef NANO_TINY
- if (function != zap_text)
+ if (function != zap_text && function != record_macro && function != run_macro)
#endif
keep_cutbuffer = FALSE;
}
--
2.53.0