From: Daniel Carl <danielcarl@gmx.de>
Date: Sat, 2 Jun 2018 20:41:41 +0000 (+0200)
Subject: Remove not really needed variable.
X-Git-Url: https://git.owens.tech/assets/112-editable-focus.html/assets/112-editable-focus.html/git?a=commitdiff_plain;h=d0a55e0a272aaff0f25035c9279b44e8fca4fab6;p=vimb.git

Remove not really needed variable.
---

diff --git a/src/input.c b/src/input.c
index 590dfea..c02f185 100644
--- a/src/input.c
+++ b/src/input.c
@@ -109,8 +109,7 @@ VbResult input_keypress(Client *c, int key)
 
 VbResult input_open_editor(Client *c)
 {
-    static unsigned long element_map_next_key = 1;
-    unsigned long element_map_key = 0;
+    static unsigned long element_map_key = 0;
     char *element_id = NULL, *command = NULL;
     char **argv, *file_path = NULL;
     const char *text = NULL, *id = NULL, *editor_command;
@@ -143,8 +142,7 @@ VbResult input_open_editor(Client *c)
 
     /* Special case: the input element does not have an id assigned to it */
     if (!success || !*id) {
-        element_map_key = element_map_next_key++;
-        char *js_command = g_strdup_printf(JS_SET_EDITOR_MAP_ELEMENT, element_map_key);
+        char *js_command = g_strdup_printf(JS_SET_EDITOR_MAP_ELEMENT, ++element_map_key);
         ext_proxy_eval_script(c, js_command, NULL);
         g_free(js_command);
     } else {