New menu sorting, fix up default SGR

This commit is contained in:
Bryan Ashby 2018-01-28 13:03:11 -07:00
parent b6317e0541
commit 999033ec15
4 changed files with 33 additions and 4 deletions

View file

@ -71,7 +71,7 @@ function HorizontalMenuView(options) {
text = focusItem ? focusItem.text : item.text;
sgr = '';
} else if(this.complexItems) {
text = pipeToAnsi(formatString(item.focused ? this.focusItemFormat : this.itemFormat, item));
text = pipeToAnsi(formatString(item.focused && this.focusItemFormat ? this.focusItemFormat : this.itemFormat, item));
sgr = this.focusItemFormat ? '' : (index === self.focusedItemIndex ? self.getFocusSGR() : self.getSGR());
} else {
text = strUtil.stylizeString(item.text, item.focused ? self.focusTextStyle : self.textStyle);