aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-25 14:32:40 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-25 14:32:40 +0200
commit4ad8ed80a6e8969fd8a2af4ef7e29929126aeaad (patch)
tree565b5fe7203bfafe6bc24ab3a1fb20ade27de3e8
parentc7cc59d242bf0e09a03e4bba111f987474d6b25f (diff)
downloadpatches-4ad8ed80a6e8969fd8a2af4ef7e29929126aeaad.tar.gz
xterm: Add patch-interactive-reset
-rw-r--r--xsrc/external/mit/xterm/dist/patch-interactive-reset47
1 files changed, 47 insertions, 0 deletions
diff --git a/xsrc/external/mit/xterm/dist/patch-interactive-reset b/xsrc/external/mit/xterm/dist/patch-interactive-reset
new file mode 100644
index 0000000..30874e5
--- /dev/null
+++ b/xsrc/external/mit/xterm/dist/patch-interactive-reset
@@ -0,0 +1,47 @@
+$NetBSD$
+
+Add interactive-reset(string) action, which does the same as
+hard-reset(), but it also sends the given string to the terminal
+immediately after performing the reset.
+
+The typical use is to send ^L after the hard reset, like so:
+
+ interactive-reset(0x0c)
+
+--- charproc.c.orig 2018-03-14 06:04:22.000000000 +0000
++++ charproc.c
+@@ -205,6 +205,7 @@ static jmp_buf vtjmpbuf;
+
+ /* event handlers */
+ static void HandleBell PROTO_XT_ACTIONS_ARGS;
++static void HandleInteractiveReset PROTO_XT_ACTIONS_ARGS;
+ static void HandleIgnore PROTO_XT_ACTIONS_ARGS;
+ static void HandleKeymapChange PROTO_XT_ACTIONS_ARGS;
+ static void HandleVisualBell PROTO_XT_ACTIONS_ARGS;
+@@ -250,6 +251,7 @@ static XtActionsRec actionsList[] = {
+ { "insert-eight-bit", HandleEightBitKeyPressed },
+ { "insert-selection", HandleInsertSelection },
+ { "insert-seven-bit", HandleKeyPressed },
++ { "interactive-reset", HandleInteractiveReset },
+ { "interpret", HandleInterpret },
+ { "keymap", HandleKeymapChange },
+ { "popup-menu", HandlePopupMenu },
+@@ -11322,6 +11326,18 @@ HandleVisualBell(Widget w GCC_UNUSED,
+ }
+
+ /* ARGSUSED */
++void
++HandleInteractiveReset(Widget w,
++ XEvent *event GCC_UNUSED,
++ String *params GCC_UNUSED,
++ Cardinal *param_count GCC_UNUSED)
++{
++ ReallyReset(term, True, False);
++ HandleStringEvent(w, event, params, param_count);
++ longjmp(vtjmpbuf, 1);
++}
++
++/* ARGSUSED */
+ static void
+ HandleIgnore(Widget w,
+ XEvent *event,