[前][次][番号順一覧][スレッド一覧]

ruby-changes:22060

From: kouji <ko1@a...>
Date: Fri, 23 Dec 2011 16:38:25 +0900 (JST)
Subject: [ruby-changes:22060] kouji:r34109 (trunk): * ext/readline/readline.c (readline_attempted_completion_function):

kouji	2011-12-23 16:38:14 +0900 (Fri, 23 Dec 2011)

  New Revision: 34109

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34109

  Log:
    * ext/readline/readline.c (readline_attempted_completion_function):
      in Readline module with GNU Readline 6 case, Readline module
      resets completion_append_character to " ", after it executes
      completion. So, Readline module stores
      completion_append_character, and Readline module always sets it
      after Readline module executes completion. [ruby-dev:43456]
      [Feature #4635]

  Modified files:
    trunk/ChangeLog
    trunk/ext/readline/readline.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34108)
+++ ChangeLog	(revision 34109)
@@ -1,3 +1,13 @@
+Fri Dec 23 16:14:30 2011  TAKAO Kouji  <kouji@t...>
+
+	* ext/readline/readline.c (readline_attempted_completion_function):
+	  in Readline module with GNU Readline 6 case, Readline module
+	  resets completion_append_character to " ", after it executes
+	  completion. So, Readline module stores
+	  completion_append_character, and Readline module always sets it
+	  after Readline module executes completion. [ruby-dev:43456]
+	  [Feature #4635]
+
 Fri Dec 23 15:59:05 2011  TAKAO Kouji  <kouji@t...>
 
 	* ext/readline/readline.c (Init_readline): libedit check
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c	(revision 34108)
+++ ext/readline/readline.c	(revision 34109)
@@ -70,6 +70,9 @@
 
 static int (*history_get_offset_func)(int);
 static int (*history_replace_offset_func)(int);
+#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
+static int readline_completion_append_character;
+#endif
 
 static char **readline_attempted_completion_function(const char *text,
                                                      int start, int end);
@@ -258,6 +261,9 @@
 static VALUE
 readline_get(VALUE prompt)
 {
+#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
+    readline_completion_append_character = rl_completion_append_character;
+#endif
     return (VALUE)readline((char *)prompt);
 }
 
@@ -642,6 +648,9 @@
     proc = rb_attr_get(mReadline, completion_proc);
     if (NIL_P(proc))
 	return NULL;
+#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
+    rl_completion_append_character = readline_completion_append_character;
+#endif
 #ifdef HAVE_RL_ATTEMPTED_COMPLETION_OVER
     rl_attempted_completion_over = 1;
 #endif

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]