[gnome-builder/wip/libide] libide: wrap sort in user action
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: wrap sort in user action
- Date: Mon, 9 Mar 2015 20:11:48 +0000 (UTC)
commit 6a151a6b6c35f7b0505fcc2b55345833937672d6
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 9 13:11:42 2015 -0700
libide: wrap sort in user action
libide/ide-source-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index d6ed2c7..a2d6e32 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -2702,13 +2702,15 @@ ide_source_view_real_sort (IdeSourceView *self,
qsort (parts, g_strv_length (parts), sizeof (gchar *), sort_func);
text = g_strjoinv ("\n", parts);
+
+ gtk_text_buffer_begin_user_action (buffer);
gtk_text_buffer_delete (buffer, &begin, &end);
gtk_text_buffer_insert (buffer, &begin, text, -1);
g_free (text);
g_strfreev (parts);
-
gtk_text_buffer_get_iter_at_offset (buffer, &begin, cursor_offset);
gtk_text_buffer_select_range (buffer, &begin, &begin);
+ gtk_text_buffer_end_user_action (buffer);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]