1
0
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:
Timo Sirainen 2000-06-14 17:44:03 +00:00 committed by cras
parent c892353bf4
commit c5d1dab0bc
2 changed files with 3 additions and 5 deletions

View File

@ -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)

View File

@ -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':