示例#1
0
文件: rl.c 项目: HTshandou/clink
//------------------------------------------------------------------------------
static int completion_shim(int count, int invoking_key)
{
    int ret;

    // rl_complete checks if it was called previously.
    if (rl_last_func == completion_shim)
    {
        rl_last_func = rl_complete;
    }

    rl_begin_undo_group();
    ret = rl_complete(count, invoking_key);
    suffix_translation();
    rl_end_undo_group();

    g_slash_translation = 0;

    return ret;
}
示例#2
0
文件: rl.c 项目: bobbyzhu/clink
//------------------------------------------------------------------------------
static int completion_shim_impl(int count, int invoking_key, int (*rl_func)(int, int))
{
    int ret;

    // rl complete functions checks if it was called previously, so restore it.
    if (rl_last_func == completion_shim || rl_last_func == menu_completion_shim)
    {
        rl_last_func = rl_func;
    }

    rl_begin_undo_group();
    ret = rl_func(count, invoking_key);
    suffix_translation();
    rl_end_undo_group();

    g_slash_translation = 0;

    return ret;
}