[libdazzle/libdazzle-3-28] suggestion-entry: fix length of text
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle/libdazzle-3-28] suggestion-entry: fix length of text
- Date: Thu, 9 Aug 2018 20:34:18 +0000 (UTC)
commit 404ec58a82201b7214da1eca1f106a63211dc053
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 8b3e84b..c898906 100644
--- a/src/suggestions/dzl-suggestion-entry-buffer.c
+++ b/src/suggestions/dzl-suggestion-entry-buffer.c
@@ -118,6 +118,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]