mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
tab-completion in the middle of line left the cursor in wrong place.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@336 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
c892353bf4
commit
c5d1dab0bc
@ -158,6 +158,9 @@ void gui_entry_set_pos(int p)
|
||||
{
|
||||
if (p >= 0 && p <= entry->len)
|
||||
pos = p;
|
||||
|
||||
entry_screenpos();
|
||||
entry_update();
|
||||
}
|
||||
|
||||
void gui_entry_move_pos(int p)
|
||||
|
@ -160,12 +160,10 @@ void handle_key(int key)
|
||||
case KEY_HOME:
|
||||
/* home */
|
||||
gui_entry_set_pos(0);
|
||||
gui_entry_move_pos(0);
|
||||
break;
|
||||
case KEY_END:
|
||||
/* end */
|
||||
gui_entry_set_pos(strlen(gui_entry_get_text()));
|
||||
gui_entry_move_pos(0);
|
||||
break;
|
||||
case KEY_PPAGE:
|
||||
/* page up */
|
||||
@ -223,7 +221,6 @@ void handle_key(int key)
|
||||
c = gui_entry_get_pos();
|
||||
gui_entry_set_pos(strlen(gui_entry_get_text()));
|
||||
gui_entry_erase(strlen(gui_entry_get_text()) - c);
|
||||
gui_entry_move_pos(0);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
@ -232,12 +229,10 @@ void handle_key(int key)
|
||||
case 1:
|
||||
/* C-A, home */
|
||||
gui_entry_set_pos(0);
|
||||
gui_entry_move_pos(0);
|
||||
break;
|
||||
case 5:
|
||||
/* C-E, end */
|
||||
gui_entry_set_pos(strlen(gui_entry_get_text()));
|
||||
gui_entry_move_pos(0);
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
|
Loading…
Reference in New Issue
Block a user