blob: 59380f9561fe657ae8e77e8e7144e592df8520a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From b58bc5359085d2c9233ac6d6a265645bfa217e82 Mon Sep 17 00:00:00 2001
From: Behdad Esfahbod <behdad@behdad.org>
Date: Wed, 31 Mar 2010 18:05:10 +0000
Subject: Bug 602596 - Cursor can become invisible
Always compute the full fore/back color first, then reverse.
That's what xterm does also.
---
diff --git a/src/vte.c b/src/vte.c
index 178010b..c6844e9 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8760,10 +8760,6 @@ vte_terminal_determine_colors(VteTerminal *terminal,
if (highlight && !cursor && terminal->pvt->highlight_color_set) {
*fore = cell ? cell->attr.fore : VTE_DEF_FG;
*back = VTE_DEF_HL;
- } else
- if (reverse ^ ((cell != NULL) && (cell->attr.reverse))) {
- *fore = cell ? cell->attr.back : VTE_DEF_BG;
- *back = cell ? cell->attr.fore : VTE_DEF_FG;
} else {
*fore = cell ? cell->attr.fore : VTE_DEF_FG;
*back = cell ? cell->attr.back : VTE_DEF_BG;
@@ -8796,6 +8792,13 @@ vte_terminal_determine_colors(VteTerminal *terminal,
}
}
}
+
+ if (reverse ^ ((cell != NULL) && (cell->attr.reverse))) {
+ int tmp;
+ tmp = *fore;
+ *fore = *back;
+ *back = tmp;
+ }
}
/* Check if a unicode character is actually a graphic character we draw
--
cgit v0.8.3.1
|