diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-14 17:44:03 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-14 17:44:03 +0000 |
commit | c5d1dab0bce51757cd0bf90afe4a2c638e2be947 (patch) | |
tree | ca832918331d106631f88be39a1c03f2e14a8e6d /src/fe-text | |
parent | c892353bf4ad425e2b9a1120c537165757f3e81b (diff) | |
download | irssi-c5d1dab0bce51757cd0bf90afe4a2c638e2be947.zip |
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
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/gui-entry.c | 3 | ||||
-rw-r--r-- | src/fe-text/gui-readline.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 5f96d30f..62ea83fb 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -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) diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 10d54c86..8aa7b0a7 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -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': |