ranger
ranger copied to clipboard
Filtering with `:scout -tp` should roll back on <Escape>
When filtering with :scout -tp, the file list view gets updated instantly when something is typed. However, when pressing Escape to cancel the console input, the filter remains.
(Since :filter is an alias to :scout -prt, it is affected as well.)
ISSUE TYPE
- Improvement/feature request
RUNTIME ENVIRONMENT
- Operating system and version: Arch
- Terminal emulator and version: termite
- Python version: 3.6.1
- Ranger version/commit: 086074db6f08af058ffdced7319287715a88d42a
- Locale: en_US.UTF-8
EXPECTED BEHAVIOR
Undo or roll back the current filtering operation.
CURRENT BEHAVIOR
Filter remains.
:scout -t alone does not change the filter at all, so I assume you use it in combination with -f. When I use :scout -tf, then type something to filter the files, and then type ESC, the filter is reset. So I can't reproduce it. Try with ranger --clean, if it works then the issue is your outdated configuration.
You're right, it doesn't happen with :scout -t. I should have verified this, since I discovered it with :filter initially. I can also confirm that -tf behave as expected.
The actual flags needed are both -t and -p. Updated OP to reflect that.
So yeah, it would make sense for :filter foo<ESC> to roll back the fliter.
https://github.com/ranger/ranger/pull/2116 Do you mean this feature?
Yes, that looks like it should address my issue, according to OP and the gif. I can't comment on the code as I am entirely unfamiliar with it.