ranger icon indicating copy to clipboard operation
ranger copied to clipboard

Filtering with `:scout -tp` should roll back on <Escape>

Open FichteFoll opened this issue 8 years ago • 5 comments

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.

FichteFoll avatar Jul 06 '17 18:07 FichteFoll

: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.

hut avatar Jul 06 '17 18:07 hut

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.

FichteFoll avatar Jul 06 '17 20:07 FichteFoll

So yeah, it would make sense for :filter foo<ESC> to roll back the fliter.

hut avatar Jul 06 '17 20:07 hut

https://github.com/ranger/ranger/pull/2116 Do you mean this feature?

kevinhwang91 avatar Sep 30 '20 18:09 kevinhwang91

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.

FichteFoll avatar Oct 08 '20 21:10 FichteFoll