diff --git a/src/plugins/fset/fset-buffer.c b/src/plugins/fset/fset-buffer.c index b03f90a82..d7032b5d7 100644 --- a/src/plugins/fset/fset-buffer.c +++ b/src/plugins/fset/fset-buffer.c @@ -690,6 +690,7 @@ fset_buffer_input_cb (const void *pointer, void *data, { ",", "mark 1" }, { NULL, NULL } }; char str_command[64]; + const char *ptr_input; int i; /* make C compiler happy */ @@ -724,7 +725,13 @@ fset_buffer_input_cb (const void *pointer, void *data, } /* filter options with given text */ - fset_option_filter_options (input_data); + ptr_input = input_data; + while (ptr_input[0] == ' ') + { + ptr_input++; + } + if (ptr_input[0]) + fset_option_filter_options (ptr_input); return WEECHAT_RC_OK; } diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index 5d9d82d9f..39230d803 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -545,7 +545,11 @@ fset_command_init () " shift+down mark/unmark option and move one line down\n" " shift+up mark/unmark option and move one line up\n" " $ refresh options, unmark all options\n" - " q close fset buffer"), + " q close fset buffer\n" + "\n" + "Note: spaces at beginning of input are ignored, so for example " + "\"q\" closes the fset buffer while \" q\" searches all options " + "with \"q\" inside name."), "-bar" " || -refresh" " || -up 1|2|3|4|5"