fixed mismerge: completion stuff

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
Sergei Trofimovich 2009-02-15 11:57:26 +02:00
parent 5454c05b38
commit d8d26d42fd

View File

@ -809,9 +809,8 @@ try_complete (char *text, int *start, int *end, INPUT_COMPLETE_FLAGS flags)
*s = 0; *s = 0;
if (*cdpath){ if (*cdpath){
r = concat_dir_and_file (cdpath, word); r = concat_dir_and_file (cdpath, word);
ignore_filenames = 1; SHOW_C_CTX("try_complete:filename_subst_2");
matches = completion_matches (r, filename_completion_function); matches = completion_matches (r, filename_completion_function, flags);
ignore_filenames = 0;
g_free (r); g_free (r);
} }
*s = c; *s = c;
@ -996,7 +995,7 @@ complete_engine (WInput *in, int what_to_do)
} }
if (in->completions){ if (in->completions){
if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) { if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) {
complete = shell_escape(in->completions [0]); char * complete = g_strdup (in->completions [0]);
if (insert_text (in, complete, strlen (complete))){ if (insert_text (in, complete, strlen (complete))){
if (in->completions [1]) if (in->completions [1])
beep (); beep ();
@ -1015,9 +1014,6 @@ complete_engine (WInput *in, int what_to_do)
WListbox *query_list; WListbox *query_list;
for (p=in->completions + 1; *p; count++, p++) { for (p=in->completions + 1; *p; count++, p++) {
q = *p;
*p = shell_escape(*p);
g_free(q);
if ((i = strlen (*p)) > maxlen) if ((i = strlen (*p)) > maxlen)
maxlen = i; maxlen = i;
} }