summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-30 16:09:34 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-03-30 16:09:34 +0000
commitf4cc9a47adb20dde673b08506479eb38f134e119 (patch)
tree1b2fccda81dbb0133696a1edfb4b655375409100
parentccbbc2f2babcfaee88d8d8040938ca6bf39d05b6 (diff)
parent622bb9186ef1123a92a61613b0f5b46119bf5d3e (diff)
downloadgtk+-f4cc9a47adb20dde673b08506479eb38f134e119.tar.gz
Merge branch 'docs' into 'master'
docs: Cover corner-case of @line_number = total lines in buffer See merge request GNOME/gtk!3373
-rw-r--r--gtk/gtktextbuffer.c6
-rw-r--r--gtk/gtktextiter.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 6f2fd5534a..40faef526d 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -3250,7 +3250,7 @@ gtk_text_buffer_remove_all_tags (GtkTextBuffer *buffer,
* Note characters, not bytes; UTF-8 may encode one character as multiple
* bytes.
*
- * If @line_number is greater than the number of lines in the @buffer,
+ * If @line_number is greater than or equal to the number of lines in the @buffer,
* the end iterator is returned. And if @char_offset is off the
* end of the line, the iterator at the end of the line is returned.
*
@@ -3301,7 +3301,7 @@ gtk_text_buffer_get_iter_at_line_offset (GtkTextBuffer *buffer,
* @byte_index must be the start of a UTF-8 character. Note bytes, not
* characters; UTF-8 may encode one character as multiple bytes.
*
- * If @line_number is greater than the number of lines in the @buffer,
+ * If @line_number is greater than or equal to the number of lines in the @buffer,
* the end iterator is returned. And if @byte_index is off the
* end of the line, the iterator at the end of the line is returned.
*
@@ -3348,7 +3348,7 @@ gtk_text_buffer_get_iter_at_line_index (GtkTextBuffer *buffer,
*
* Initializes @iter to the start of the given line.
*
- * If @line_number is greater than the number of lines
+ * If @line_number is greater than or equal to the number of lines
* in the @buffer, the end iterator is returned.
*
* Returns: whether the exact position has been found
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index 24e25d9d85..9868110568 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -4052,7 +4052,7 @@ gtk_text_iter_set_visible_line_index (GtkTextIter *iter,
*
* Moves iterator @iter to the start of the line @line_number.
*
- * If @line_number is negative or larger than the number of lines
+ * If @line_number is negative or larger than or equal to the number of lines
* in the buffer, moves @iter to the start of the last line in the buffer.
*/
void