mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 03:40:16 +02:00
Add 'word_completion_backward' command to scroll backwards in the completion
list, bug #313. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4830 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
4faa743972
commit
548e5115bb
3 changed files with 19 additions and 8 deletions
|
|
@ -128,7 +128,7 @@ static void free_completions(void)
|
|||
}
|
||||
|
||||
/* manual word completion - called when TAB is pressed */
|
||||
char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase)
|
||||
char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase, int backward)
|
||||
{
|
||||
static int startpos = 0, wordlen = 0;
|
||||
int old_startpos, old_wordlen;
|
||||
|
|
@ -205,8 +205,12 @@ char *word_complete(WINDOW_REC *window, const char *line, int *pos, int erase)
|
|||
|
||||
if (continue_complete) {
|
||||
/* complete from old list */
|
||||
complist = complist->next != NULL ? complist->next :
|
||||
g_list_first(complist);
|
||||
if (backward)
|
||||
complist = complist->prev != NULL ? complist->prev :
|
||||
g_list_last(complist);
|
||||
else
|
||||
complist = complist->next != NULL ? complist->next :
|
||||
g_list_first(complist);
|
||||
want_space = last_want_space;
|
||||
} else {
|
||||
/* get new completion list */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue