Commit 438e7e90 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent 6130996a
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:
......
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment