Signed-off-by: Silvan Jegen <[email protected]>
---
 clients/editor.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/clients/editor.c b/clients/editor.c
index 6805d8a..1ed3eec 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -944,16 +944,10 @@ text_entry_reset_preedit(struct text_entry *entry)
 static void
 text_entry_commit_and_reset(struct text_entry *entry)
 {
-       char *commit = NULL;
-
        if (entry->preedit.commit)
-               commit = strdup(entry->preedit.commit);
+               text_entry_insert_at_cursor(entry, entry->preedit.commit, 0, 0);
 
        text_entry_reset_preedit(entry);
-       if (commit) {
-               text_entry_insert_at_cursor(entry, commit, 0, 0);
-               free(commit);
-       }
 
        zwp_text_input_v1_reset(entry->text_input);
        text_entry_update(entry);
-- 
2.10.2

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to