X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.cpp;h=9f99e794c5e3c7cb98fc0564242af21aac79f172;hb=5152e147e9a053482f6a4895f3d2028864f6cf2f;hp=87f88c75eadd39f94929f21745b131f363a394e6;hpb=6e5db3e5ba48b5e68efd38360a20ce127cd23578;p=libs%2Fgltk.git diff --git a/source/entry.cpp b/source/entry.cpp index 87f88c7..9f99e79 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -153,6 +153,18 @@ bool Entry::key_press(unsigned key, unsigned) check_view_range(); rebuild(); } + else if(key==Input::KEY_END) + { + unsigned row, col; + text.offset_to_coords(edit_pos, row, col); + set_edit_position(text.coords_to_offset(row, text.get_line_length(row))); + } + else if(key==Input::KEY_HOME) + { + unsigned row, col; + text.offset_to_coords(edit_pos, row, col); + set_edit_position(text.coords_to_offset(row, 0)); + } else return false;