Skip to content
Snippets Groups Projects
Commit aef216b3 authored by Nick Zavaritsky's avatar Nick Zavaritsky
Browse files

Suppress extra whitespace in remote completion

parent 3acd71df
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,8 @@ console_completion_handler(const char *text, int start, int end)
*/
if (lua_equal(readline_L, -1, lua_upvalueindex(1))) {
lua_pop(readline_L, 1);
return lua_rl_complete(readline_L, text, start, end);
res = lua_rl_complete(readline_L, text, start, end);
goto done;
}
/* Slow path - arbitrary completion handler. */
......@@ -126,6 +127,10 @@ console_completion_handler(const char *text, int start, int end)
lua_pop(readline_L, 1);
}
lua_pop(readline_L, 1);
done:
#if RL_READLINE_VERSION >= 0x0600
rl_completion_suppress_append = 1;
#endif
return res;
}
......@@ -609,8 +614,5 @@ lua_rl_complete(lua_State *L, const char *text, int start, int end)
}
lua_settop(L, savetop);
#if RL_READLINE_VERSION >= 0x0600
rl_completion_suppress_append = 1;
#endif
return ml.list;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment