summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk_window.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c
index eee9d6c59..561becf49 100644
--- a/gtk/gtk_window.c
+++ b/gtk/gtk_window.c
@@ -1093,11 +1093,15 @@ void gui_window_place_caret(struct gui_window *g, int x, int y, int height)
void gui_window_remove_caret(struct gui_window *g)
{
- if (g->careth == 0)
+ int oh = g->careth;
+
+ if (oh == 0)
return;
+ g->careth = 0;
+
gui_window_redraw(g, g->caretx, g->carety,
- g->caretx, g->carety + g->careth);
+ g->caretx, g->carety + oh);
}
void gui_window_new_content(struct gui_window *g)