[gnome-builder] sourceview: clear cursors before changing case



commit e5434f49c9d0ad5135a8a39634ae08fb94df432c
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jan 12 23:05:00 2018 -0800

    sourceview: clear cursors before changing case
    
    We don't want to affect the non-selection cursors. We can't support
    multiple selections properly today, but we can at least keep the operation
    working in the presence of multiple cursors.
    
    Fixes #278

 src/libide/sourceview/ide-source-view.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index b6eca1dee..b7bcd3866 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -2859,12 +2859,15 @@ static void
 ide_source_view_real_change_case (IdeSourceView           *self,
                                   GtkSourceChangeCaseType  type)
 {
+  IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
   GtkTextBuffer *buffer;
   GtkTextIter begin;
   GtkTextIter end;
 
   g_assert (IDE_IS_SOURCE_VIEW (self));
 
+  ide_cursor_remove_cursors (priv->cursor);
+
   buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (self));
   gtk_text_buffer_get_selection_bounds (buffer, &begin, &end);
 


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