[vte] emulation: Drop separate standout attribute, it's actually reverse in xterm



commit ac4cce6587f7dbd15d5574fef1fdc5910adab99a
Author: Egmont Koblinger <egmont gmail com>
Date:   Sun May 18 20:12:44 2014 +0200

    emulation: Drop separate standout attribute, it's actually reverse in xterm

 src/vte.c        |    6 ------
 src/vterowdata.h |    3 +--
 src/vteseq.c     |   51 ++-------------------------------------------------
 3 files changed, 3 insertions(+), 57 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index e0376ec..d004453 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8813,12 +8813,6 @@ vte_terminal_determine_colors_internal(VteTerminal *terminal,
                        fore = corresponding_dim_index[fore - VTE_LEGACY_COLORS_OFFSET];
        }
 
-       /* And standout */
-       if (cell->attr.standout) {
-               if (back >= VTE_LEGACY_COLORS_OFFSET && back < VTE_LEGACY_COLORS_OFFSET + 
VTE_LEGACY_COLOR_SET_SIZE)
-                       back += VTE_COLOR_BRIGHT_OFFSET;
-       }
-
        /* Reverse cell? */
        if (cell->attr.reverse) {
                swap (&fore, &back);
diff --git a/src/vterowdata.h b/src/vterowdata.h
index 7dfda99..6af9634 100644
--- a/src/vterowdata.h
+++ b/src/vterowdata.h
@@ -58,7 +58,6 @@ typedef struct _VteCellAttr {
        /* 4-byte boundary */
        guint64 back: 25;       /* see vte-private.h */
 
-       guint64 standout: 1;
        guint64 underline: 1;
        guint64 strikethrough: 1;
 
@@ -67,6 +66,7 @@ typedef struct _VteCellAttr {
        guint64 half: 1;
 
        guint64 invisible: 1;
+        /* 1 bit unused */
 } VteCellAttr;
 G_STATIC_ASSERT (sizeof (VteCellAttr) == 8);
 
@@ -106,7 +106,6 @@ static const VteIntCell basic_cell = {
                        VTE_DEFAULT_FG, /* fore */
                        VTE_DEFAULT_BG, /* back */
 
-                       0, /* standout */
                        0, /* underline */
                        0, /* strikethrough */
 
diff --git a/src/vteseq.c b/src/vteseq.c
index dceb4d5..41d64cc 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -1934,30 +1934,7 @@ vte_sequence_handler_scroll_up (VteTerminal *terminal, GValueArray *params)
 static void
 vte_sequence_handler_se (VteTerminal *terminal, GValueArray *params)
 {
-       const char *standout;
-
-       /* Standout may be mapped to another attribute, so attempt to do
-        * the Right Thing here.
-        *
-        * If the standout sequence is the same as another sequence, do what
-        * we'd do for that other sequence instead. */
-
-       standout = _vte_terminfo_get_string(terminal->pvt->terminfo,
-                                            VTE_TERMINFO_VAR_ENTER_STANDOUT_MODE);
-
-        /* FIXMEchpe: why not cache this in pvt? */
-       if (standout != NULL &&
-            (vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_BLINK_MODE)     /* blink */   ||
-             vte_terminal_terminfo_string_same_as_for (terminal, standout, VTE_TERMINFO_VAR_ENTER_BOLD_MODE) 
     /* bold */    ||
-             vte_terminal_terminfo_string_same_as_for (terminal, standout, VTE_TERMINFO_VAR_ENTER_DIM_MODE)  
     /* half */    ||
-             vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_REVERSE_MODE)   /* reverse */ ||
-             vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_UNDERLINE_MODE) /* underline */))
-       {
-               vte_sequence_handler_me (terminal, params);
-       } else {
-               /* Otherwise just set standout mode. */
-               terminal->pvt->screen->defaults.attr.standout = 0;
-       }
+        terminal->pvt->screen->defaults.attr.reverse = 0;
 }
 
 /* Cursor down, with scrolling. */
@@ -1979,31 +1956,7 @@ vte_sequence_handler_SF (VteTerminal *terminal, GValueArray *params)
 static void
 vte_sequence_handler_so (VteTerminal *terminal, GValueArray *params)
 {
-       const char *standout;
-
-       /* Standout may be mapped to another attribute, so attempt to do
-        * the Right Thing here.
-        *
-        * If the standout sequence is the same as another sequence, do what
-        * we'd do for that other sequence instead. */
-
-       standout = _vte_terminfo_get_string(terminal->pvt->terminfo,
-                                            VTE_TERMINFO_VAR_ENTER_STANDOUT_MODE);
-
-       if (vte_terminal_terminfo_string_same_as_for (terminal, standout, VTE_TERMINFO_VAR_ENTER_BLINK_MODE) 
/* blink */)
-               vte_sequence_handler_mb (terminal, params);
-       else if (vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_BOLD_MODE) /* bold */)
-               vte_sequence_handler_md (terminal, params);
-       else if (vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_DIM_MODE) /* half */)
-               vte_sequence_handler_mh (terminal, params);
-       else if (vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_REVERSE_MODE) /* reverse */)
-               vte_sequence_handler_mr (terminal, params);
-       else if (vte_terminal_terminfo_string_same_as_for (terminal, standout, 
VTE_TERMINFO_VAR_ENTER_UNDERLINE_MODE) /* underline */)
-               vte_sequence_handler_us (terminal, params);
-       else {
-               /* Otherwise just set standout mode. */
-               terminal->pvt->screen->defaults.attr.standout = 1;
-       }
+        terminal->pvt->screen->defaults.attr.reverse = 1;
 }
 
 /* Cursor up, scrolling if need be. */


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