about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/kilo.c4
-rw-r--r--src/lua.c6
2 files changed, 2 insertions, 8 deletions
diff --git a/src/kilo.c b/src/kilo.c
index 09df441..ac2e991 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -991,7 +991,6 @@ void word_at_cursor(char* out, int capacity) {
 
 extern void save_to_current_definition_and_editor_buffer(lua_State *L, char *name);
 extern void load_editor_buffer_to_current_definition_in_image(lua_State *L);
-extern void editor_refresh_buffer(void);
 #define CURRENT_DEFINITION_LEN 256
 static void editorGo(lua_State* L) {
     char query[CURRENT_DEFINITION_LEN+1] = {0};
@@ -1014,7 +1013,8 @@ static void editorGo(lua_State* L) {
             editorSetStatusMessage("");
             if (c == ENTER) {
               save_to_current_definition_and_editor_buffer(L, query);
-              editor_refresh_buffer();
+              clearEditor();
+              editorOpen("teliva_editor_buffer");
             }
             return;
         } else if (c == CTRL_U) {
diff --git a/src/lua.c b/src/lua.c
index a94c912..567450d 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -489,15 +489,9 @@ static void save_image (lua_State *L) {
 /* death and rebirth */
 char **Argv = NULL;
 extern int edit (lua_State *L, char *filename, const char *message);
-extern void clearEditor (void);
-extern int editorOpen (char *filename);
 int edit_buffer (lua_State *L, const char *message) {
   return edit(L, "teliva_editor_buffer", message);
 }
-void editor_refresh_buffer (void) {
-  clearEditor();
-  editorOpen("teliva_editor_buffer");
-}
 
 
 int load_editor_buffer_to_current_definition_in_image(lua_State *L) {