Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle middle mouse click and fix pylint tests #2939

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

m4ttm
Copy link

@m4ttm m4ttm commented Jan 22, 2024

ISSUE TYPE

  • Bug fix
  • Improvement/feature implementation

RUNTIME ENVIRONMENT

  • Operating system and version: Debian 12
  • Terminal emulator and version: Kitty 0.26.5 & tmux 3.3a_3
  • Python version: Python 3.9.18
  • Ranger version/commit: 136416c
  • Locale: en_GB.utf8

CHECKLIST

  • The CONTRIBUTING document has been read [REQUIRED]
  • All changes follow the code style [REQUIRED]
  • All new and existing tests pass [REQUIRED]
  • Changes require config files to be updated
    • Config files have been updated
  • Changes require documentation to be updated
    • Documentation has been updated
  • Changes require tests to be updated
    • Tests have been updated

DESCRIPTION

Use middle mouse click to close and fix Pylint dependency problem

MOTIVATION AND CONTEXT

Not able to customize the middle mouse button because ranger doesn't recognise it

Allows seamless use of the mouse, preventing the need to touch the keyboard to close

n/a

TESTING

make test

n/a

There is a dependency problem preventing the pylint tests from running,
this commit fixes that
Ranger doesn't handle middle mouse clicks and treats the button as a scroll down event. I wanted to use the middle mouse button to close ranger
@Rom1deTroyes
Copy link

Handling the middle mouse button is surely a good behavior, but having this to close the application seems unexpected.

I expect middle mouse button to paste my previously mouse selection if we are in an input, or behave like most file browser.

For reference, as Ubuntu is a popular GNU/Linux distribution, maybe we can take this as a base for reflexion : https://help.ubuntu.com/stable/ubuntu-help/mouse-middleclick.html.en

@m4ttm
Copy link
Author

m4ttm commented Jan 24, 2024

I agree it's non standard but I wanted to use the mouse to cd to a directory, I can start ranger from my tmux right click menu and have it configured to the chosen directory on exit. My neovim right click menu has everything I need to jump through codebases so this smoothes out everything and keeps me away from the keyboard until it's time to type again. Maybe more standard behaviour would be preferable for other users?

@m4ttm
Copy link
Author

m4ttm commented Jan 24, 2024

Maybe the best thing to do would be to make the mouse buttons user configurable with more standard behaviour as default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants