mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
fixed mismerge: completion stuff
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
parent
5454c05b38
commit
d8d26d42fd
@ -809,9 +809,8 @@ try_complete (char *text, int *start, int *end, INPUT_COMPLETE_FLAGS flags)
|
||||
*s = 0;
|
||||
if (*cdpath){
|
||||
r = concat_dir_and_file (cdpath, word);
|
||||
ignore_filenames = 1;
|
||||
matches = completion_matches (r, filename_completion_function);
|
||||
ignore_filenames = 0;
|
||||
SHOW_C_CTX("try_complete:filename_subst_2");
|
||||
matches = completion_matches (r, filename_completion_function, flags);
|
||||
g_free (r);
|
||||
}
|
||||
*s = c;
|
||||
@ -996,7 +995,7 @@ complete_engine (WInput *in, int what_to_do)
|
||||
}
|
||||
if (in->completions){
|
||||
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 (in->completions [1])
|
||||
beep ();
|
||||
@ -1015,9 +1014,6 @@ complete_engine (WInput *in, int what_to_do)
|
||||
WListbox *query_list;
|
||||
|
||||
for (p=in->completions + 1; *p; count++, p++) {
|
||||
q = *p;
|
||||
*p = shell_escape(*p);
|
||||
g_free(q);
|
||||
if ((i = strlen (*p)) > maxlen)
|
||||
maxlen = i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user