mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/readline/readline.c (readline_attempted_completion_function):
return 2 items if completion_proc returns only 1 item (for libedit). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6362afe606
commit
37852577fc
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri May 20 15:52:18 2005 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* ext/readline/readline.c (readline_attempted_completion_function):
|
||||
return 2 items if completion_proc returns only 1 item (for libedit).
|
||||
|
||||
Fri May 20 01:24:33 2005 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* ext/readline/extconf.rb: check rl_vi_editing_mode() and
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_READLINE_READLINE_H
|
||||
#include <readline/readline.h>
|
||||
#endif
|
||||
|
@ -167,9 +168,9 @@ readline_attempted_completion_function(text, start, end)
|
|||
result[matches + 1] = NULL;
|
||||
|
||||
if (matches == 1) {
|
||||
result[0] = result[1];
|
||||
result[1] = NULL;
|
||||
} else {
|
||||
result[0] = strdup(result[1]);
|
||||
}
|
||||
else {
|
||||
register int i = 1;
|
||||
int low = 100000;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue