summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-12-03 13:26:25 -0500
committerBehdad Esfahbod <behdad@behdad.org>2009-12-03 13:26:25 -0500
commit47406a81f737f6f01fd148ab004de4eac641d571 (patch)
treefe46a4007cd7ad1bd042f74cfef9ba802a7968f8
parente72d7ed4da9d065afc494da304741ca5484b1f9b (diff)
Bug 603713 - ibeam/underline cursor broken with large inner-border
-rw-r--r--src/vte.c46
1 files changed, 17 insertions, 29 deletions
diff --git a/src/vte.c b/src/vte.c
index d8a53e4..2824554 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8716,12 +8716,12 @@ vte_terminal_unichar_is_local_graphic(VteTerminal *terminal, vteunistr c, gboole
}
static void
-vte_terminal_fill_rectangle_int(VteTerminal *terminal,
- struct vte_palette_entry *entry,
- gint x,
- gint y,
- gint width,
- gint height)
+vte_terminal_fill_rectangle(VteTerminal *terminal,
+ struct vte_palette_entry *entry,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
GdkColor color;
gboolean wasdrawing;
@@ -8744,17 +8744,6 @@ vte_terminal_fill_rectangle_int(VteTerminal *terminal,
}
static void
-vte_terminal_fill_rectangle(VteTerminal *terminal,
- struct vte_palette_entry *entry,
- gint x,
- gint y,
- gint width,
- gint height)
-{
- vte_terminal_fill_rectangle_int(terminal, entry, x, y, width, height);
-}
-
-static void
vte_terminal_draw_line(VteTerminal *terminal,
struct vte_palette_entry *entry,
gint x,
@@ -10494,31 +10483,30 @@ vte_terminal_paint_cursor(VteTerminal *terminal)
TRUE^(reverse|selected), selected, TRUE,
&fore, &back);
- x = item.x + terminal->pvt->inner_border.left;
- y = item.y + terminal->pvt->inner_border.top;
+ x = item.x;
+ y = item.y;
switch (terminal->pvt->cursor_shape) {
case VTE_CURSOR_SHAPE_IBEAM:
- vte_terminal_draw_line(terminal, &terminal->pvt->palette[back],
- x - 2*VTE_LINE_WIDTH,
- y,
- x - 2*VTE_LINE_WIDTH,
- y + height - 1);
+ vte_terminal_fill_rectangle(terminal, &terminal->pvt->palette[back],
+ x, y,
+ VTE_LINE_WIDTH, height);
break;
case VTE_CURSOR_SHAPE_UNDERLINE:
- vte_terminal_draw_line(terminal, &terminal->pvt->palette[back],
- x,
- y + height - VTE_LINE_WIDTH,
- x + cursor_width - 1,
- y + height - VTE_LINE_WIDTH);
+ vte_terminal_fill_rectangle(terminal, &terminal->pvt->palette[back],
+ x, y + height - VTE_LINE_WIDTH,
+ cursor_width, VTE_LINE_WIDTH);
break;
case VTE_CURSOR_SHAPE_BLOCK:
+ x += terminal->pvt->inner_border.left;
+ y += terminal->pvt->inner_border.top;
+
color.red = terminal->pvt->palette[back].red;
color.green = terminal->pvt->palette[back].green;
color.blue = terminal->pvt->palette[back].blue;