diff --git a/lib/widget.js b/lib/widget.js index c6e2edc..398de54 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -5248,6 +5248,15 @@ List.prototype.appendItem = function(item) { List.prototype.fuzzyFind = function(search, back) { var index = this.getItemIndex(this.selected); var start = this.selected + (back ? -1 : 1); + + if (search[0] === '/' && search[search.length - 1] === '/') { + try { + search = new RegExp(search.slice(1, -1)); + } catch (e) { + ; + } + } + var finder = typeof search === 'string' ? function(item) { return !!~item.indexOf(search); } : search.test.bind(search);