[gnome-builder/wip/libide] libide: ignore backspace helper if there is a selection



commit e17a4b847b34ef86b17193d1789ef945d47a9b95
Author: Christian Hergert <christian hergert me>
Date:   Tue Feb 24 19:10:32 2015 -0800

    libide: ignore backspace helper if there is a selection

 libide/ide-source-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index f86b8d5..d896537 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -703,7 +703,7 @@ ide_source_view_key_press_event (GtkWidget   *widget,
    * If we are backspacing, and the next character is the matching brace,
    * then we might want to delete it too.
    */
-  if (event->keyval == GDK_KEY_BackSpace)
+  if ((event->keyval == GDK_KEY_BackSpace) && !gtk_text_buffer_get_has_selection (buffer))
     if (ide_source_view_maybe_delete_match (self, event))
       return TRUE;
 


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