mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Fixed filename-completion-function for readline completion
* guile-readline/readline.c (scm_filename_completion_function): A completion function should return #f when there's no more candidates. Since the result of readline's rl_filename_completion_function was never checked it was impossible for it to work as intended and instead of #f it threw an error from trying to convert NULL to an scm string.
This commit is contained in:
parent
221203b0df
commit
02439a1240
1 changed files with 4 additions and 1 deletions
|
@ -386,8 +386,11 @@ SCM_DEFINE (scm_filename_completion_function, "filename-completion-function", 2,
|
|||
#else
|
||||
s = filename_completion_function (c_text, scm_is_true (continuep));
|
||||
#endif
|
||||
ans = scm_take_locale_string (s);
|
||||
free (c_text);
|
||||
if (!s) {
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
ans = scm_take_locale_string (s);
|
||||
return ans;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue