[gnome-builder] libide: ignore reindent on selections
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: ignore reindent on selections
- Date: Sun, 11 Oct 2015 13:28:15 +0000 (UTC)
commit 13092f06ef25b27f6cae6b0ead2e03d93d5ba1dc
Author: Christian Hergert <chergert redhat com>
Date: Sun Oct 11 09:28:03 2015 -0400
libide: ignore reindent on selections
We don't have support for reindenting on selections, so avoid that case
until we add support for it.
libide/ide-source-view.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index b1d833f..8978204 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -3679,6 +3679,11 @@ ide_source_view_real_reindent (IdeSourceView *self)
return;
buffer = GTK_TEXT_BUFFER (priv->buffer);
+
+ gtk_text_buffer_get_selection_bounds (buffer, &begin, &end);
+ if (gtk_text_iter_get_line (&begin) != gtk_text_iter_get_line (&end))
+ return;
+
mark = gtk_text_buffer_get_insert (buffer);
gtk_text_buffer_get_iter_at_mark (buffer, &begin, mark);
gtk_text_iter_set_line_offset (&begin, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]