Fixed tab completion (esc-tab) crash.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2009-05-29 10:28:59 +03:00
parent f0182a6969
commit ae96b4dac0

View File

@ -87,8 +87,10 @@ filename_completion_function (const char *_text, int state, INPUT_COMPLETE_FLAGS
SHOW_C_CTX("filename_completion_function"); SHOW_C_CTX("filename_completion_function");
if (text && (flags & INPUT_COMPLETE_SHELL_ESC)) if (_text && (flags & INPUT_COMPLETE_SHELL_ESC))
text = shell_unescape (_text); text = shell_unescape (_text);
else
text = g_strdup (_text);
/* If we're starting the match process, initialize us a bit. */ /* If we're starting the match process, initialize us a bit. */
if (!state){ if (!state){