[vte] parser: Add another sequence



commit d3d9ce88326b0b0d94341de70a73b114e004fdcf
Author: Christian Persch <chpe src gnome org>
Date:   Fri Oct 19 23:46:03 2018 +0200

    parser: Add another sequence

 src/parser-cmd.hh |  1 +
 src/parser-csi.hh |  1 +
 src/vteseq.cc     | 25 +++++++++++++++++++++++++
 3 files changed, 27 insertions(+)
---
diff --git a/src/parser-cmd.hh b/src/parser-cmd.hh
index 40e51360..6fcaacc2 100644
--- a/src/parser-cmd.hh
+++ b/src/parser-cmd.hh
@@ -61,6 +61,7 @@ _VTE_CMD(DECSC) /* save cursor */
 _VTE_CMD(DECSCUSR) /* set cursor style */
 _VTE_CMD(DECSED) /* selective erase in display */
 _VTE_CMD(DECSEL) /* selective erase in line */
+_VTE_CMD(DECSGR) /* DEC select graphics rendition */
 _VTE_CMD(DECSLPP) /* set lines per page */
 _VTE_CMD(DECSLRM_OR_SCOSC) /* set left and right margins or SCO save cursor */
 _VTE_CMD(DECSR) /* secure reset */
diff --git a/src/parser-csi.hh b/src/parser-csi.hh
index 30d7498c..410d533f 100644
--- a/src/parser-csi.hh
+++ b/src/parser-csi.hh
@@ -118,6 +118,7 @@ _VTE_NOQ(SCP,                    CSI,    'k',  NONE,  1, SPACE    ) /* select ch
 _VTE_SEQ(RM_ECMA,                CSI,    'l',  NONE,  0, NONE     ) /* reset-mode-ecma */
 _VTE_SEQ(RM_DEC,                 CSI,    'l',  WHAT,  0, NONE     ) /* reset-mode-dec */
 _VTE_SEQ(SGR,                    CSI,    'm',  NONE,  0, NONE     ) /* select-graphics-rendition */
+_VTE_NOQ(DECSGR,                 CSI,    'm',  WHAT,  0, NONE     ) /* DEC select graphics rendition */
 _VTE_NOQ(XTERM_SRV,              CSI,    'm',  GT,    0, NONE     ) /* xterm-set-resource-value */
 _VTE_SEQ(DSR_ECMA,               CSI,    'n',  NONE,  0, NONE     ) /* device-status-report-ecma */
 _VTE_NOQ(XTERM_RRV,              CSI,    'n',  GT,    0, NONE     ) /* xterm-reset-resource-value */
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 196eb020..2885644c 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -4219,6 +4219,31 @@ Terminal::DECSFC(vte::parser::Sequence const& seq)
          */
 }
 
+void
+Terminal::DECSGR(vte::parser::Sequence const& seq)
+{
+        /*
+         * DECSGR - DEC select graphics rendition
+         * Selects the character attributes to use for newly inserted
+         * characters.
+         *
+         * Arguments:
+         *   args[0:]: the attributes
+         *     0 = reset all attributes (deprecated; same as SGR 0)
+         *     4 = set superscript and reset subscript
+         *     5 = set subscript and reset superscript
+         *     6 = set overline (deprecated; same as SGR 53)
+         *     24 = reset superscript and subscript
+         *     26 = reset overline (deprecated; same as SGR 55)
+         *
+         * Defaults:
+         *   args[0]: 0 (reset all attributes)
+         *
+         * References: DEC PPLV2
+         */
+        /* TODO: consider implementing sub/superscript? */
+}
+
 void
 Terminal::DECSIXEL(vte::parser::Sequence const& seq)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]