From 551dda2ba526b930b84b9daef2b238abc140bf98 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Sun, 2 Jun 2019 21:26:43 +0200
Subject: Fixed the caret rendering position.

---
 src/gtkext/gtkbufferdisplay.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gtkext/gtkbufferdisplay.c b/src/gtkext/gtkbufferdisplay.c
index d8061d7..a1833a6 100644
--- a/src/gtkext/gtkbufferdisplay.c
+++ b/src/gtkext/gtkbufferdisplay.c
@@ -525,14 +525,14 @@ static gboolean gtk_buffer_display_draw(GtkWidget *widget, cairo_t *cr)
 
     }
 
-    /* Curseur clignotant ? */
+    cairo_restore(cr);
 
-    if (gtk_widget_is_focus(widget))
-        gtk_buffer_display_draw_caret(display, cr);
+    /* Curseur clignotant ? */
 
     cairo_restore(cr);
 
-    cairo_restore(cr);
+    if (gtk_widget_is_focus(widget))
+        gtk_buffer_display_draw_caret(display, cr);
 
     cairo_restore(cr);
 
-- 
cgit v0.11.2-87-g4458