[Groonga-commit] groonga/groonga [master] [libedit] swap edit line and history intialize order.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 7月 6日 (水) 10:28:22 JST


Kouhei Sutou	2011-07-06 01:28:22 +0000 (Wed, 06 Jul 2011)

  New Revision: 5aa946bb978021cfc5baec5d4cb13083f0735881

  Log:
    [libedit] swap edit line and history intialize order.

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+5 -3)
===================================================================
--- src/groonga.c    2011-07-06 01:27:54 +0000 (1cbe78a)
+++ src/groonga.c    2011-07-06 01:28:22 +0000 (979b16a)
@@ -2288,11 +2288,13 @@ main(int argc, char **argv)
 #ifdef HAVE_LIBEDIT
   if (!batchmode) {
     setlocale(LC_ALL, "");
+
+    command_history = history_winit();
+    history_w(command_history, &command_history_event, H_SETSIZE, 200);
+
     edit_line = el_init(argv[0], stdin, stdout, stderr);
     el_wset(edit_line, EL_PROMPT, &disp_prompt);
     el_wset(edit_line, EL_EDITOR, L"emacs");
-    command_history = history_winit();
-    history_w(command_history, &command_history_event, H_SETSIZE, 200);
     el_wset(edit_line, EL_HIST, history_w, command_history);
   }
 #endif
@@ -2370,8 +2372,8 @@ main(int argc, char **argv)
   }
 #ifdef HAVE_LIBEDIT
   if (!batchmode) {
-    history_wend(command_history);
     el_end(edit_line);
+    history_wend(command_history);
   }
 #endif
   grn_fin();




Groonga-commit メーリングリストの案内
Back to archive index