Skip to content

add :unnarrow to disable :narrow mode #3084

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

njthomas
Copy link

Add :unnarrow functionality to disable :narrow mode even if files are selected.

Implemented using a default argument for :narrow that defaults to True.

ISSUE TYPE

  • Improvement/feature implementation

RUNTIME ENVIRONMENT

  • Operating system and version: FreeBSD 14.2-p3 and macOS Sonoma 14.7.4 (23H420)
  • Terminal emulator and version: iTerm2 Build 3.15.3
  • Python version: Python 3.11.11 (FreeBSD) and Python 3.13.3 (macOS Homebrew)
  • Ranger version/commit: master/b31db0
  • Locale: en_US.UTF-8

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

This patch adds a new command alias :unnarrow which disables :narrow functionality. If narrow is not enabled, it has no effect.

MOTIVATION AND CONTEXT

There is no easy way to disable narrow without unselecting files. This command will allow the user to do that.

TESTING

make test has been run successfully on FreeBSD and macOS.

Apart from adding a single alias (:unnarrow) to config/rc.conf and adding a default argument to class narrow in config/commands.py, there are no changes to other areas of the codebase.

":unnarrow" is actually an alias for ":narrow False".

Implemented using a default argument for :narrow that defaults to True.
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.

1 participant