diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 01:35:23 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 01:35:23 +0000 |
commit | e1dabb0fa36fd0d33d786210e66880146b6547da (patch) | |
tree | abbaffd6828f378379bbc43a12dd039cb818163e /ext | |
parent | b818c6e1db306e116f6a037c6b53c0d579b10a99 (diff) |
merge revision(s) 34109:
* 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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/readline/readline.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 6b7dbc2cbb..68ff07dc0d 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -69,6 +69,9 @@ static ID id_orig_prompt, id_last_prompt; #endif static int (*history_get_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); @@ -257,6 +260,9 @@ insert_ignore_escape(VALUE self, VALUE prompt) 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); } @@ -641,6 +647,9 @@ readline_attempted_completion_function(const char *text, int start, int end) 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 |