mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Don't add command to history if it's already in there as last entry. patch by peder.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2281 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
c15769685c
commit
db907c209f
@ -41,6 +41,10 @@ void command_history_add(HISTORY_REC *history, const char *text)
|
||||
g_return_if_fail(history != NULL);
|
||||
g_return_if_fail(text != NULL);
|
||||
|
||||
link = g_list_last(history->list);
|
||||
if (link != NULL && strcmp(link->data, text) == 0)
|
||||
return; /* same as previous entry */
|
||||
|
||||
if (settings_get_int("max_command_history") < 1 ||
|
||||
history->lines < settings_get_int("max_command_history"))
|
||||
history->lines++;
|
||||
|
Loading…
Reference in New Issue
Block a user