summaryrefslogtreecommitdiff
path: root/gtk/gtktextiter.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2002-12-23 18:13:46 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-12-23 18:13:46 +0000
commit98c47bc895788ba273d60d22f1aadd1774f2f326 (patch)
tree45f62fa07b3f3849465d82cd25753507da34779e /gtk/gtktextiter.c
parentdecacd40a6171bb1bb8245e748c29f71ba942bb5 (diff)
downloadgdk-pixbuf-98c47bc895788ba273d60d22f1aadd1774f2f326.tar.gz
Don't call gtk_text_iter_backward_sentence_start() if count is zero.
2002-12-23 Matthias Clasen <maclas@gmx.de> * gtk/gtktextiter.c (gtk_text_iter_backward_sentence_starts): Don't call gtk_text_iter_backward_sentence_start() if count is zero. (#99115) * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Call move_cursor() even if the cursor hasn't moved, since it has the side effect of canceling the selection. (#81395, #98537, #9833)
Diffstat (limited to 'gtk/gtktextiter.c')
-rw-r--r--gtk/gtktextiter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index d81e1847f..4db227380 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -3302,6 +3302,9 @@ gtk_text_iter_backward_sentence_starts (GtkTextIter *iter,
{
g_return_val_if_fail (iter != NULL, FALSE);
+ if (count == 0)
+ return FALSE;
+
if (count < 0)
return gtk_text_iter_forward_sentence_ends (iter, -count);