summary refs log tree commit diff stats
path: root/ranger/core/tab.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "ranger <path> can select files"hut2018-05-161-6/+2
| | | | | | | | | | Due to this commit, pressing `<Right>` on a file does nothing. Normally it should open the file. Until this is fixed, I'll remove this commit to restore this basic functionality. Unfortunately, the revert makes ranger crash when run like `ranger <somefilename>`, but this is a much less frequent use case, so the revert is still warranted. This reverts commit 2288a40b45ccdc57d287648c96c5bbe378b95a6d.
* ranger <path> can select filestoonn2018-03-311-2/+6
| | | | | | | | | | Because `ranger somefile` used to invoke rifle but that moved to its own command `ranger somefile` seemed defunct. People expected ranger to select the file and were baffled when it crashed. Now the documentation using the verbiage "path" is no longer confusing/a lie because it just works™ (until it breaks). Fixes #930
* Fix the "inconsistent-return-statements" Pylint warningWojciech Siewierski2017-12-171-1/+1
| | | | | Some of the changes definitely could have been done better with some refactoring instead of adding a "return" or two. Patches welcome!
* linting: pylint: Enable `broad-except`, Improve loggingnfnty2017-01-211-1/+1
| | | | | | | Handle exceptions explicitly to prevent unexpected errors from causing problems. Improve exception and notification logging.
* Python 3 division: Import `division` from `__future__`nfnty2017-01-211-1/+1
|
* linting: Python 2 compat: Import from `__future__`nfnty2017-01-171-0/+2
|
* linting: pylint and flake8nfnty2017-01-171-7/+6
|
* linting: autopep8nfnty2017-01-171-3/+4
|
* container.settings: use constants for `setopt` signal prioritieshut2016-07-041-1/+3
|
* Use 'except Exception:' instead of 'except:'stepshal2016-06-221-1/+1
|
* Put colon-separated compound statement on separate lines.stepshal2016-06-211-1/+2
|
* Remove unexpected spaces around keyword / parameter equalsstepshal2016-06-191-1/+1
|
* Add two blank lines where is expectedstepshal2016-06-161-0/+1
|
* adding ability to clear folder filter upon navigating from it. optional and ↵Vitaly Belman2016-03-061-0/+5
| | | | false by default.
* Neater copyright headerhut2015-03-191-2/+2
|
* fix python version checking with python2.6hut2015-02-101-2/+2
|
* proper checking for the python versionhut2015-02-081-2/+2
| | | | | Let's not force python to jump from version 9 straight to 31, just because some silly software did fuzzy version checks :D
* update email addresshut2014-12-111-1/+1
|
* Changed email address in source codehut2013-08-081-1/+1
| | | | | Since lavabit.com ceased providing email services, I had to change my address from hut lavabit com to hut lepus uberspace de.
* core.tab: consistent return value in get_selection()hut2013-03-011-3/+1
|
* Fix docstrings to comply with the PEP8hut2013-02-221-2/+2
| | | | http://www.python.org/dev/peps/pep-0008/#documentation-strings
* updated copyright noticeshut2013-02-221-1/+1
|
* update email address (romanz@lavabit.com -> hut@lavabit.com)hut2013-02-221-1/+1
|
* replaced tabs with 4 spaces in all python fileshut2013-02-101-153/+153
| | | | | | | | | PEP 8 (Style Guide for Python Code) suggests the use of 4 spaces: http://www.python.org/dev/peps/pep-0008/#indentation If you need to use tools like "git blame", you can use the -w option to ignore this commit entirely. Patches will continue to work if you substitute tabs with 4 spaces everywhere except in the Makefile.
* core.tab: Fix files being treated as dirs after renamehut2013-02-051-8/+3
| | | | | | | | | When you deleted a directory and created a file with the same name, it was treated like a directory, with ranger trying to preview it and throwing lots of errors. This was because it tried to look for the path of the currently selected file in fm.directories - a directory cache - and if a file with the same name existed as a directory once, it would have found it there.
* core.tab: fix incorrect pointer on tab changehut2013-01-281-1/+7
| | | | | | | | | | | | To reproduce the bug that this patch fixes, do: 1. start in a place where the second item is a directory that contains at least two files (the usual $HOME with sort_directories_first=True will likely do) 2. open (and enter) a new tab with ^N 3. move down and right, entering the directory. The cursor is now on file 1 4. switch to tab 1, then back to tab 2 5. now the cursor is on file 2 instead of file 1.
* core.tab: fix %s macro in empty directorieshut2012-12-151-1/+3
|
* core.tab: make tab.get_selection() cursor-agnostichut2012-12-141-1/+4
| | | | | | | Without this, if you enter another tab, the cursor of the directory may change and get_selection() will not return the actual selected file of the tab anymore (unless they have been marked, in which case everything's fine).
* core.tab: fixed restoring pointer on tab changehut2012-08-071-1/+1
|
* core.tab: fix weakref bug with python2 that breaks fm.thisfilehut2012-08-071-2/+7
| | | | | | in python2, weak references are not equal to the original object when tested with "==", and this breaks Tab._set_thisfile_from_signal and Tab._on_tab_change in python2 if weak=True is used in signal bindings
* core.actions: fix tab-history bugs, inherit history from prev. tabhut2012-08-051-0/+3
|
* core.actions: Added {old,new} arguments to 'tba.change' signalhut2012-08-051-1/+1
|
* core.tab: save and restore pointer when changing tabhut2012-08-051-0/+10
|
* core.tab: pass the tab as argument in the move-signalhut2012-08-051-2/+2
|
* core.actions: updated tab_open to work with new Tab classhut2012-08-051-0/+1
|
* Replaced core.environment with core.tabhut2012-08-051-0/+140
The Environment class was weird to begin with. It had attributes and methods that belonged to other classes. For example, keybinding management (the attributes keybuffer and keymaps) should go to gui.ui, directory management (garbage_collect, get_directory) should be in core.fm whereas entering directories (enter_dir) and managing history (history_go) should be the task of a separate Tab class. This commit fixes it, all references to env should be only for backwards compatibility now. I still need to rewrite the tabbing API in core.actions to work with the new system. Every tab that is opened will have its own Tab instance with its own history and pointer. Tab, unlike Environment, is no SignalDispatcher - Environment's signals were moved to fm. BEFORE: fm.env.cf AFTER : fm.thisfile BEFORE: fm.env.cwd AFTER : fm.thisdir BEFORE: fm.env.signal_bind("move", ...) # same for the "cd" signal AFTER : fm.signal_bind("move", ...) BEFORE: fm.env.keybuffer # same for fm.env.keymaps AFTER : fm.ui.keybuffer BEFORE: fm.env.get_directory("/usr/lib") # same for half of the env methods AFTER : fm.get_directory("/usr/lib") BEFORE: fm.env.get_selection() # same for the other half of the env methods AFTER : fm.thistab.get_selection() Old configurations and hacks should still work because I added a compatibility layer for the Environment class which translates all getters and setters to the respective call of the new class. What will NOT work are the Environment signals, please bind them to fm instead.