CleverRaven/Cataclysm-DDA — pull request #7085 by abstrakct (2014-04-07 21:53:00+00:00)
Title: Reset the filter with 'r' in the advanced inventory.

I wanted a way to reset the filter in the advanced inventory manager, so I added it. Previously you had to press f and then backspace all the way to clear your filter. This PR makes it possible to just press 'r' to clear your filter, just like in the 'V' mode where you can 'f'ilter and 'r'eset the filter.

I put the "[R]eset" string at the end of the line, so that it's easy to see that you can press 'r' to reset the filter, but would welcome suggestions for other places to put it. I tried putting it just after the filter string itself (i.e. "< [F]ilter: blah > [R]eset" but that looked somewhat off. So, input on this is appreciated. Both methods might "break" on very long filters, but in my experience with playing the game, I rarely write very long filters, since you can usually narrow down what you want with a rather short string. (e.g. "rope", "wire", "wat", "meat", "corp", etc.)
Even on a low resolution (i.e. the default one if you don't change any options) you'd need a filter of more than 16 characters to make it "break". And in that case, all that happens is that "[R]eset" is written over the last part of your filter. If your filter is a lot longer, two characters are written out after "[R]eset" (instead of the frame) and the rest seems to be ignored/overwritten.

Suggestions for improvements, fixes, changes, better ways to do it and whatnot is appreciated, as is acceptance or rejectance (is rejectance a word?).