From 22ce03fd9440f3b2bf6db78ef17e1e52222cdd2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Wilmet?= Date: Tue, 8 Apr 2014 22:43:25 +0200 Subject: [PATCH] doc: improve documentation of gtk_text_iter_inside_word() There is a possible confusion with the sentence: "@iter is inside a natural-language word" The iter should be viewed here as the pointed character (i.e. on the right of the iter), not as a position between two characters. Instead of improving the documentation, another solution would have been to change the implementation so it is interpreted as an iter position inside a word, i.e. between two characters that are part of a natural-language word. But maybe some applications rely on the current implementation. https://bugzilla.gnome.org/show_bug.cgi?id=727908 --- gtk/gtktextiter.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index 5b91919a61..bb7fdb0f82 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -3402,12 +3402,15 @@ gtk_text_iter_ends_word (const GtkTextIter *iter) /** * gtk_text_iter_inside_word: * @iter: a #GtkTextIter - * - * Determines whether @iter is inside a natural-language word (as - * opposed to say inside some whitespace). Word breaks are determined - * by Pango and should be correct for nearly any language (if not, the - * correct fix would be to the Pango word break algorithms). - * + * + * Determines whether the character pointed by @iter is part of a + * natural-language word (as opposed to say inside some whitespace). Word + * breaks are determined by Pango and should be correct for nearly any language + * (if not, the correct fix would be to the Pango word break algorithms). + * + * Note that if gtk_text_iter_starts_word() returns %TRUE, then this function + * returns %TRUE too, since @iter points to the first character of the word. + * * Returns: %TRUE if @iter is inside a word **/ gboolean