コード例 #1
0
ファイル: bufed.c プロジェクト: dgdunix/qemacs-tmp
static void bufed_select(EditState *s, int temp)
{
    BufedState *bs = s->mode_data;
    StringItem *item;
    EditBuffer *b;
    EditState *e;
    int index;

    index = list_get_pos(s);
    if (index < 0 || index >= bs->items.nb_items)
        return;

    if (temp && index == bs->last_index)
        return;

    item = bs->items.items[index];
    b = eb_find(item->str);
    if (!b)
        return;
    e = find_window(s, KEY_RIGHT);
    if (temp) {
        if (e) {
            bs->last_index = index;
            switch_to_buffer(e, b);
        }
        return;
    }
    if (e) {
        /* delete dired window */
        do_delete_window(s, 1);
        switch_to_buffer(e, b);
    } else {
        switch_to_buffer(s, b);
    }
}
コード例 #2
0
ファイル: bufed.c プロジェクト: deeice/Qemacs
static void bufed_select(EditState *s)
{
    BufedState *bs = s->mode_data;
    StringItem *item;
    EditBuffer *b;
    EditState *e;
    int index;

    index = list_get_pos(s);
    if (index < 0 || index >= bs->items.nb_items)
        return;
    item = bs->items.items[index];
    b = eb_find(item->str);
    if (!b)
        return;
    e = find_window_right(s);
    if (!e) 
        return;
    /* delete dired window */
    do_delete_window(s, 1);
    switch_to_buffer(e, b);
}