[vte/wip/sixels] terminal: Avoid triggering assertions in set_hard_wrapped()



commit 4faaa6db2c8403af32317806b4d817a43d4acf83
Author: Hans Petter Jansson <hpj cl no>
Date:   Mon Jul 6 22:38:38 2020 +0200

    terminal: Avoid triggering assertions in set_hard_wrapped()

 src/vteseq.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/vteseq.cc b/src/vteseq.cc
index b52460bc..82a0ee04 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -4416,8 +4416,13 @@ Terminal::DECSIXEL(vte::parser::Sequence const& seq)
        /* Erase characters under the image */
 
        for (i = 0; i < height; ++i) {
+                vte::grid::row_t row = top + i;
+
                erase_characters(width, true);
-                set_hard_wrapped(top + i);
+
+                if (row > m_screen->insert_delta - 1
+                    && row < m_screen->insert_delta + m_row_count)
+                        set_hard_wrapped(row);
 
                if (i == height - 1) {
                        if (m_modes_private.MINTTY_SIXEL_SCROLL_CURSOR_RIGHT())


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