mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 07:53:02 +01:00
return correct value, fix comment
This commit is contained in:
parent
ea3fcd5b79
commit
f30dccf726
@ -188,10 +188,10 @@ int complete_line(ChatContext *ctx, const void *list, int n_items, int size)
|
|||||||
|
|
||||||
/* matches /sendfile "<incomplete-dir>" line to matching directories.
|
/* matches /sendfile "<incomplete-dir>" line to matching directories.
|
||||||
|
|
||||||
if only one match, auto-complete line and return diff between old len and new len.
|
if only one match, auto-complete line.
|
||||||
return 0 if > 1 match and print out all the matches
|
if > 1 match, print out all the matches and partially complete line
|
||||||
return -1 if no matches */
|
return diff between old len and new len of ctx->line, or -1 if no matches
|
||||||
|
*/
|
||||||
#define MAX_DIRS 256
|
#define MAX_DIRS 256
|
||||||
|
|
||||||
int dir_match(ToxWindow *self, Tox *m, const wchar_t *line)
|
int dir_match(ToxWindow *self, Tox *m, const wchar_t *line)
|
||||||
@ -242,9 +242,6 @@ int dir_match(ToxWindow *self, Tox *m, const wchar_t *line)
|
|||||||
|
|
||||||
for (i = 0; i < dircount; ++i)
|
for (i = 0; i < dircount; ++i)
|
||||||
line_info_add(self, NULL, NULL, NULL, dirnames[i], SYS_MSG, 0, 0);
|
line_info_add(self, NULL, NULL, NULL, dirnames[i], SYS_MSG, 0, 0);
|
||||||
|
|
||||||
complete_line(self->chatwin, dirnames, dircount, NAME_MAX);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return complete_line(self->chatwin, dirnames, dircount, NAME_MAX);
|
return complete_line(self->chatwin, dirnames, dircount, NAME_MAX);
|
||||||
|
Loading…
Reference in New Issue
Block a user