When deleting words, delete preceding whitespace as well. (#325358, Akkana
2006-01-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c (gtk_entry_delete_from_cursor): When deleting words, delete preceding whitespace as well. (#325358, Akkana Peck)
This commit is contained in:
committed by
Matthias Clasen
parent
6130996a77
commit
438e7e9040
@ -1,3 +1,8 @@
|
||||
2006-01-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_delete_from_cursor): When deleting
|
||||
words, delete preceding whitespace as well. (#325358, Akkana Peck)
|
||||
|
||||
2006-01-02 Anders Carlsson <andersca@imendio.com>
|
||||
|
||||
* gdk/quartz/GdkQuartzWindow.c:
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
2006-01-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_delete_from_cursor): When deleting
|
||||
words, delete preceding whitespace as well. (#325358, Akkana Peck)
|
||||
|
||||
2006-01-02 Anders Carlsson <andersca@imendio.com>
|
||||
|
||||
* gdk/quartz/GdkQuartzWindow.c:
|
||||
|
||||
@ -2574,26 +2574,26 @@ gtk_entry_delete_from_cursor (GtkEntry *entry,
|
||||
if (count < 0)
|
||||
{
|
||||
/* Move to end of current word, or if not on a word, end of previous word */
|
||||
end_pos = gtk_entry_move_backward_word (entry, end_pos, TRUE);
|
||||
end_pos = gtk_entry_move_forward_word (entry, end_pos, TRUE);
|
||||
end_pos = gtk_entry_move_backward_word (entry, end_pos, FALSE);
|
||||
end_pos = gtk_entry_move_forward_word (entry, end_pos, FALSE);
|
||||
}
|
||||
else if (count > 0)
|
||||
{
|
||||
/* Move to beginning of current word, or if not on a word, begining of next word */
|
||||
start_pos = gtk_entry_move_forward_word (entry, start_pos, TRUE);
|
||||
start_pos = gtk_entry_move_backward_word (entry, start_pos, TRUE);
|
||||
start_pos = gtk_entry_move_forward_word (entry, start_pos, FALSE);
|
||||
start_pos = gtk_entry_move_backward_word (entry, start_pos, FALSE);
|
||||
}
|
||||
|
||||
/* Fall through */
|
||||
case GTK_DELETE_WORD_ENDS:
|
||||
while (count < 0)
|
||||
{
|
||||
start_pos = gtk_entry_move_backward_word (entry, start_pos, TRUE);
|
||||
start_pos = gtk_entry_move_backward_word (entry, start_pos, FALSE);
|
||||
count++;
|
||||
}
|
||||
while (count > 0)
|
||||
{
|
||||
end_pos = gtk_entry_move_forward_word (entry, end_pos, TRUE);
|
||||
end_pos = gtk_entry_move_forward_word (entry, end_pos, FALSE);
|
||||
count--;
|
||||
}
|
||||
gtk_editable_delete_text (editable, start_pos, end_pos);
|
||||
|
||||
Reference in New Issue
Block a user