FarManager icon indicating copy to clipboard operation
FarManager copied to clipboard

Lock filter command for menus does not work

Open rohitab opened this issue 3 years ago • 4 comments

Far Manager version

3.0.6074.0 x64

OS version

10.0.22623.1037

Other software

No response

Steps to reproduce

  1. Press F9 to show the menu bar
  2. Press L to open the Left dropdown menu
  3. Press the right Alt to enable filtering mode
  4. Type in file. The menu will now only show items with file in their name, viz. File owners and File links.
  5. Press Ctrl+Alt+L to lock the filter. The filter indicator will change from [file] to <file> indicating that the filter is locked.
  6. Press F10 or Esc to close the dropdown menu
  7. Press L to open the Left dropdown menu again

Expected behavior

The menu should show filtered items only since the filter was locked. The filter indicator should show <file>.

Actual behavior

The menu shows all items. The filter indicator is not displayed.

Note that the Lock filter command does not work in any of these menus either:

  • User menu F2
  • Change drive menu Alt+F1 and Alt+F2
  • Plugin commands menu F11
  • Configure plugins menu Alt+Shift+F9
  • Code pages menu in Viewer and Editor Shift+F8
  • Filters menu Ctrl+I
  • Configuration editor far:config

In all the above cases, the filter indicator changes to show that the filter is locked. However, closing and reopening the menu removes the filter.

rohitab avatar Dec 23 '22 16:12 rohitab

The menu should show filtered items only since the filter was locked.

"Lock the filter" does not mean "make it permanent", but "stop accepting more letters into the filter and let the menu process the pressed keys as usual".

Menus can have user-configured or autogenerated hotkeys to invoke corresponding items. The filter intercepts the input and hotkeys don't work, locking it allows to use the hotkeys again.

alabuzhev avatar Dec 23 '22 20:12 alabuzhev

I see. Please feel free to remove the bug tag.

It would be a nice feature to have. Would you consider adding it as an enhancement?

rohitab avatar Dec 24 '22 13:12 rohitab

Persisting and restoring filter state sounds interesting. However, unlike, say, panels, menus are not that unique, there is a legion of them all over the place. Coming up with an universal solution (that would also cover menus spawned by plugins and macros) could be tricky, so no ETA for this.

alabuzhev avatar Dec 24 '22 15:12 alabuzhev

No worries. I'll be happy to test it out whenever it's ready. Thanks.

rohitab avatar Dec 25 '22 16:12 rohitab