]> Pileus Git - ~andy/gtk/commitdiff
Allow to select the last word in the buffer. (#135487, Paolo Borelli)
authorMatthias Clasen <maclas@gmx.de>
Wed, 3 Mar 2004 23:28:44 +0000 (23:28 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 3 Mar 2004 23:28:44 +0000 (23:28 +0000)
Thu Mar  4 00:31:54 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtktextview.c (extend_selection):
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Allow
to select the last word in the buffer.  (#135487, Paolo Borelli)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextview.c

index 42a97426f2be9d817b6040042d5fdb53ae896511..96f8e491e9f7c8642375f756ce8e60c8890d21a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Mar  4 00:31:54 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktextview.c (extend_selection): 
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Allow
+       to select the last word in the buffer.  (#135487, Paolo Borelli)
+
 Wed Mar  3 23:54:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkentrycompletion.c: Doc update.
index 42a97426f2be9d817b6040042d5fdb53ae896511..96f8e491e9f7c8642375f756ce8e60c8890d21a7 100644 (file)
@@ -1,3 +1,9 @@
+Thu Mar  4 00:31:54 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktextview.c (extend_selection): 
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Allow
+       to select the last word in the buffer.  (#135487, Paolo Borelli)
+
 Wed Mar  3 23:54:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkentrycompletion.c: Doc update.
index 42a97426f2be9d817b6040042d5fdb53ae896511..96f8e491e9f7c8642375f756ce8e60c8890d21a7 100644 (file)
@@ -1,3 +1,9 @@
+Thu Mar  4 00:31:54 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktextview.c (extend_selection): 
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Allow
+       to select the last word in the buffer.  (#135487, Paolo Borelli)
+
 Wed Mar  3 23:54:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkentrycompletion.c: Doc update.
index 42a97426f2be9d817b6040042d5fdb53ae896511..96f8e491e9f7c8642375f756ce8e60c8890d21a7 100644 (file)
@@ -1,3 +1,9 @@
+Thu Mar  4 00:31:54 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktextview.c (extend_selection): 
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Allow
+       to select the last word in the buffer.  (#135487, Paolo Borelli)
+
 Wed Mar  3 23:54:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkentrycompletion.c: Doc update.
index 42a97426f2be9d817b6040042d5fdb53ae896511..96f8e491e9f7c8642375f756ce8e60c8890d21a7 100644 (file)
@@ -1,3 +1,9 @@
+Thu Mar  4 00:31:54 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktextview.c (extend_selection): 
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Allow
+       to select the last word in the buffer.  (#135487, Paolo Borelli)
+
 Wed Mar  3 23:54:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkentrycompletion.c: Doc update.
index dbb4e2ffcba89b7e6ba22cb5985a1bdd7de2fde0..78f907da9dc3ce631ebc33c147557b230d6ea7a1 100644 (file)
@@ -4617,8 +4617,11 @@ gtk_text_view_move_cursor_internal (GtkTextView     *text_view,
     case GTK_MOVEMENT_WORDS:
       if (count < 0)
         gtk_text_iter_backward_visible_word_starts (&newplace, -count);
-      else if (count > 0)
-        gtk_text_iter_forward_visible_word_ends (&newplace, count);
+      else if (count > 0) 
+       {
+         if (!gtk_text_iter_forward_visible_word_ends (&newplace, count))
+           gtk_text_iter_forward_to_end (&newplace);
+       }
       break;
 
     case GTK_MOVEMENT_DISPLAY_LINES:
@@ -5398,7 +5401,10 @@ extend_selection (GtkTextView *text_view,
            gtk_text_iter_backward_visible_word_start (start);
          
          if (!gtk_text_iter_ends_word (end))
-           gtk_text_iter_forward_visible_word_end (end);
+           {
+             if (!gtk_text_iter_forward_visible_word_end (end))
+               gtk_text_iter_forward_to_end (end);
+           }
        }
       else
        extend = FALSE;