mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Simon Budig's patch (posted by me):
[ #513235 ] prevent readline filename completion
This commit is contained in:
parent
8fef47be5f
commit
0c1ceaf66d
1 changed files with 3 additions and 0 deletions
|
@ -460,6 +460,9 @@ on_completion(char *text, int state)
|
||||||
lock released! */
|
lock released! */
|
||||||
save_tstate = PyThreadState_Swap(NULL);
|
save_tstate = PyThreadState_Swap(NULL);
|
||||||
PyEval_RestoreThread(completer_tstate);
|
PyEval_RestoreThread(completer_tstate);
|
||||||
|
/* Don't use the default filename completion if we
|
||||||
|
* have a custom completion function... */
|
||||||
|
rl_attempted_completion_over = 1;
|
||||||
r = PyObject_CallFunction(completer, "si", text, state);
|
r = PyObject_CallFunction(completer, "si", text, state);
|
||||||
if (r == NULL)
|
if (r == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue