fix word sel in scrollback

SVN revision: 72758
This commit is contained in:
Carsten Haitzler 2012-06-24 08:45:10 +00:00
parent 256059af6e
commit 23e9852efa
2 changed files with 24 additions and 2 deletions

View File

@ -42,6 +42,13 @@ _cb_ct_options(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event _
options_toggle(ct_win, ct_bg, ct_term);
}
static void
_cb_ct_about(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
controls_toggle(ct_win, ct_bg, ct_term);
// XXX: show about box.
}
void
controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
{
@ -97,6 +104,21 @@ controls_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
evas_object_show(o);
evas_object_smart_callback_add(o, "clicked", _cb_ct_options, NULL);
o = elm_separator_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
elm_separator_horizontal_set(o, EINA_TRUE);
elm_box_pack_end(ct_box, o);
evas_object_show(o);
o = elm_button_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, "About");
elm_box_pack_end(ct_box, o);
evas_object_show(o);
evas_object_smart_callback_add(o, "clicked", _cb_ct_about, NULL);
edje_object_part_swallow(bg, "terminology.controls", ct_frame);
evas_object_show(ct_frame);
}

View File

@ -586,7 +586,7 @@ _sel_word(Evas_Object *obj, int cx, int cy)
int x, w = 0;
if (!sd) return;
cells = termpty_cellrow_get(sd->pty, cy - sd->scroll, &w);
cells = termpty_cellrow_get(sd->pty, cy, &w);
if (!cells) return;
sd->cur.sel = 1;
sd->cur.makesel = 0;
@ -616,7 +616,7 @@ _sel_word_to(Evas_Object *obj, int cx, int cy)
int x, w = 0;
if (!sd) return;
cells = termpty_cellrow_get(sd->pty, cy - sd->scroll, &w);
cells = termpty_cellrow_get(sd->pty, cy, &w);
if (!cells) return;
if (sd->cur.sel1.x > cx || sd->cur.sel1.y > cy)
{