[libdazzle] suggestion-entry: fix length of text
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] suggestion-entry: fix length of text
- Date: Thu, 9 Aug 2018 20:33:19 +0000 (UTC)
commit 5d6fd6c2c535b86e3e4683d548e45da131bfe01a
Author: Christian Hergert <chergert redhat com>
Date: Thu Aug 9 13:32:04 2018 -0700
suggestion-entry: fix length of text
This fixes some beeps that would be heard from Gtk due to failed length
checks when deleting.
src/suggestions/dzl-suggestion-entry-buffer.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/suggestions/dzl-suggestion-entry-buffer.c b/src/suggestions/dzl-suggestion-entry-buffer.c
index 155ee64..217af7e 100644
--- a/src/suggestions/dzl-suggestion-entry-buffer.c
+++ b/src/suggestions/dzl-suggestion-entry-buffer.c
@@ -119,6 +119,9 @@ dzl_suggestion_entry_buffer_get_text (GtkEntryBuffer *buffer,
priv->text = g_string_free (str, FALSE);
}
+ if (n_bytes != NULL)
+ *n_bytes = strlen (priv->text);
+
return priv->text;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]