From 060be30803b10c8ea2893e3ec880a46451d3cfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 1 Oct 2020 20:15:32 +0200 Subject: [PATCH] =?UTF-8?q?term:=20add=20private=20mode=20flag=20=E2=80=98?= =?UTF-8?q?=E2=80=99reverse-wrap=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- csi.c | 5 +++++ terminal.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/csi.c b/csi.c index 53a90805..5c847089 100644 --- a/csi.c +++ b/csi.c @@ -399,6 +399,10 @@ decset_decrst(struct terminal *term, unsigned param, bool enable) term->hide_cursor = !enable; break; + case 45: + term->reverse_wrap = enable; + break; + case 1000: if (enable) term->mouse_tracking = MOUSE_CLICK; @@ -576,6 +580,7 @@ xtsave(struct terminal *term, unsigned param) } case 25: term->xtsave.show_cursor = !term->hide_cursor; break; + case 45: term->xtsave.reverse_wrap = term->reverse_wrap; break; case 1000: term->xtsave.mouse_click = term->mouse_tracking == MOUSE_CLICK; break; case 1001: break; case 1002: term->xtsave.mouse_drag = term->mouse_tracking == MOUSE_DRAG; break; diff --git a/terminal.h b/terminal.h index 60a4aba4..817ee8ba 100644 --- a/terminal.h +++ b/terminal.h @@ -237,6 +237,7 @@ struct terminal { enum keypad_keys keypad_keys_mode; bool reverse; bool hide_cursor; + bool reverse_wrap; bool auto_margin; bool insert_mode; bool bracketed_paste; @@ -256,6 +257,7 @@ struct terminal { uint32_t application_cursor_keys:1; uint32_t reverse:1; uint32_t show_cursor:1; + uint32_t reverse_wrap:1; uint32_t auto_margin:1; uint32_t cursor_blink:1; uint32_t insert_mode:1;