summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-12-29 17:18:39 +0100
committerBoris Faure <billiob@gmail.com>2018-12-29 17:21:07 +0100
commit68787ad524a359634880b7f2e7fe820b881c40af (patch)
tree7e8ef2bd03e77014158a9894040dd2804864ac12 /src
parent63911989fc12a9be9004295673a6c522531ead82 (diff)
tests/termptyesc: handle DECSACE
Also regenerate tests since checksums changed due to new attribute
Diffstat (limited to 'src')
-rw-r--r--src/bin/termpty.h1
-rw-r--r--src/bin/termptyesc.c30
-rw-r--r--src/bin/termptyops.c1
3 files changed, 32 insertions, 0 deletions
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index dd08f08..7a3aee2 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -120,6 +120,7 @@ typedef struct _Term_State {
120 unsigned int cjk_ambiguous_wide : 1; 120 unsigned int cjk_ambiguous_wide : 1;
121 unsigned int hide_cursor : 1; 121 unsigned int hide_cursor : 1;
122 unsigned int combining_strike : 1; 122 unsigned int combining_strike : 1;
123 unsigned int sace_rectangular : 1;
123} Term_State; 124} Term_State;
124 125
125typedef struct _Term_Cursor { 126typedef struct _Term_Cursor {
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index bfde79c..e6c6410 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1772,6 +1772,34 @@ _handle_esc_csi_decscusr(Termpty *ty, Eina_Unicode **b)
1772 termio_set_cursor_shape(ty->obj, shape); 1772 termio_set_cursor_shape(ty->obj, shape);
1773} 1773}
1774 1774
1775static void
1776_handle_esc_csi_decsace(Termpty *ty, Eina_Unicode **b)
1777{
1778 int arg = _csi_arg_get(ty, b);
1779
1780 DBG("DECSACE (%d) Select Attribute Change Extent", arg);
1781
1782 switch (arg)
1783 {
1784 case -CSI_ARG_ERROR:
1785 return;
1786 case -CSI_ARG_NO_VALUE:
1787 EINA_FALLTHROUGH;
1788 case 0:
1789 EINA_FALLTHROUGH;
1790 case 1:
1791 ty->termstate.sace_rectangular = 0;
1792 break;
1793 case 2:
1794 ty->termstate.sace_rectangular = 1;
1795 break;
1796 default:
1797 WRN("Invalid DECSACE %d", arg);
1798 ty->decoding_error = EINA_TRUE;
1799 return;
1800 }
1801}
1802
1775static int 1803static int
1776_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce) 1804_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
1777{ 1805{
@@ -2251,6 +2279,8 @@ HVP:
2251 case 'x': 2279 case 'x':
2252 if (*(cc-1) == '$') 2280 if (*(cc-1) == '$')
2253 _handle_esc_csi_decfra(ty, &b); 2281 _handle_esc_csi_decfra(ty, &b);
2282 else if (*(cc-1) == '*')
2283 _handle_esc_csi_decsace(ty, &b);
2254 break; 2284 break;
2255 case 'z': 2285 case 'z':
2256 if (*(cc-1) == '$') 2286 if (*(cc-1) == '$')
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index ad6bf62..2684e88 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -459,6 +459,7 @@ termpty_soft_reset_state(Termpty *ty)
459 ty->termstate.no_autorepeat = 0; 459 ty->termstate.no_autorepeat = 0;
460 ty->termstate.cjk_ambiguous_wide = 0; 460 ty->termstate.cjk_ambiguous_wide = 0;
461 ty->termstate.hide_cursor = 0; 461 ty->termstate.hide_cursor = 0;
462 ty->termstate.sace_rectangular = 0;
462 ty->mouse_mode = MOUSE_OFF; 463 ty->mouse_mode = MOUSE_OFF;
463 ty->mouse_ext = MOUSE_EXT_NONE; 464 ty->mouse_ext = MOUSE_EXT_NONE;
464 ty->bracketed_paste = 0; 465 ty->bracketed_paste = 0;