[vte] parser: cat: Make linter warn on unsupported RLogin DECSIXEL ID extension



commit c21b4223c2a031e281659efcb0c4becb3c15434f
Author: Christian Persch <chpe src gnome org>
Date:   Fri Feb 5 22:43:03 2021 +0100

    parser: cat: Make linter warn on unsupported RLogin DECSIXEL ID extension

 src/parser-cat.cc | 6 ++++++
 src/vteseq.cc     | 2 ++
 2 files changed, 8 insertions(+)
---
diff --git a/src/parser-cat.cc b/src/parser-cat.cc
index fec7d1b1..e9e5409d 100644
--- a/src/parser-cat.cc
+++ b/src/parser-cat.cc
@@ -759,6 +759,12 @@ public:
                          */
                         if (seq.collect1(1) == 5)
                                 warn("DECSIXEL OR-mode not supported");
+
+                        /* Image ID (args[3]) is a nonstandard RLogin extension that is
+                         * not supported in VTE.
+                         */
+                        if (seq.collect1(3) != -1)
+                                warn("DECSIXEL ID extension not supported");
                         break;
 
                 default:
diff --git a/src/vteseq.cc b/src/vteseq.cc
index be1e52bd..a968e449 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -4380,11 +4380,13 @@ Terminal::DECSIXEL(vte::parser::Sequence const& seq)
          *    5: OR mode (nonstandard NetBSD/x68k extension, see
          *       [https://qiita.com/arakiken/items/26f6c67da5a9f9f907ac])
          *  args[2]: horizontal grid size in the unit set by SSU
+         *  args[3]: image ID (range 0..1024) (nonstandard RLogin extension)
          *
          * Defaults:
          *   args[0]: 0
          *   args[1]: 2 (1 for printers)
          *   args[2]: no default
+         *   args[3]: no default
          *
          * References: VT330
          *             DEC PPLV2 ยง 5.4


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