about summary refs log tree commit diff stats
path: root/ranger
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'victorbnl-viewnior-config' HEAD mastertoonn2022-06-151-0/+2
|\
| * Add viewnior in rifle configVictor B2022-03-051-0/+2
| |
* | browsercolumn: Only add the separator when neededJeremy Cantrell2022-06-131-2/+2
| | | | | | | | | | | | When predisplay_right is empty (which is the case when vcs_aware is off), the separator should be omitted. This fixes the error introduced by my last commit.
* | browsercolumn: Fix separator depthJeremy Cantrell2022-06-111-1/+1
| | | | | | | | | | It looks like the separator is being unexpectedly flattened by the list concatenation.
* | browsercolumn: Use number of items for widthtoonn2022-05-271-1/+1
| | | | | | | | | | | | | | | | The width of the widest line number, which is often the last one visible in the list is not always the same thing as the width of the item that would be at the very bottom of the screen. When a directory contains fewer items than lines are available for display, the former can have fewer digits.
* | browsercolumn: Take into account one_indexed settingtoonn2022-05-271-2/+5
| | | | | | | | | | Line number width calculation was ignoring the one_indexed setting. This meant recalculating the width one line too late.
* | browsercolumn: Lowercase line_numbers in keytoonn2022-05-271-1/+1
| | | | | | | | | | | | The `line_numbers` setting is a string but case shouldn't matter, especially for caching, this is handled in branches already but the caching key was overlooked.
* | browsercolumn: Refactor linum_text_lentoonn2022-05-271-4/+10
| | | | | | | | | | | | The calculation isn't difficult but the lines were long and there's several branches involved. Giving `len(str())` a name and introducing names for intermediate results should make it easier to comprehend
* | browsercolumn: Fix relative line number widthtoonn2022-05-261-2/+10
| | | | | | | | | | | | | | | | For relative line numbers the width that actually matters is the width for all the displayed line numbers. The width of the largest index of the displayed files doesn't matter. Only the width of the relative indices and the width of the currently highlighted item's index, unless `relative_current_zero` is enabled.
* | browsercolumn: Include linum_text_len in keytoonn2022-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The width of an item needs to be recalculated if the width of the line numbers changes. This happens every time we get to another order of magnitude (an additional digit). This is based on [review comments](https://github.com/ranger/ranger/pull/2346#issuecomment-1062257526) from markus-bauer. The solution opted for here is basically their second bullet point. I tried the third bullet point first, replacing `line_numbers` by `linum_text_len` in the key but this requires recalculating `linum_text_len` to be zero when line numbers are disabled, which feels like a somewhat clunky overloading while we have a perfectly usable boolean flag available. Closes #2346 Co-authored-by: markus-bauer <mail.markus.bauer@gmail.com>
* | browsercolumn: Remove off-by-one trailing spacetoonn2022-05-261-4/+5
| | | | | | | | | | | | The file size was always followed by a space in case it needed to be separated from other trailing information but this should only happen if anything actually follows it.
* | browsercolumn: Accept line_numbers case insensitivelytoonn2022-05-261-3/+6
| |
* | browsercolumn: Fix off-by-one in line number widthtoonn2022-05-261-1/+1
| | | | | | | | | | | | | | The status bar wasn't taken into account when calculating the width of the visible line numbers. This meant the width would change right before a number with an extra digit appeared or one later than when it disappeared.
* | runner: Initialize variables outside of try-excepttoonn2022-05-261-2/+4
| |
* | accumulator: Make get_list an abstract methodtoonn2022-05-261-2/+4
| | | | | | | | | | | | Implementations need the `self` parameter and PyLint complains when the number of arguments changes. Since it's never used without reimplementation, `@abstractmethod` is appropriate.
* | colorscheme: Make use an abstract methodtoonn2022-05-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The `use` method has always been decorated as being a `@staticmethod`. Many colorschemes use fields to store certain properties, these then need to be accessed using `self`. This isn't possible with a static method so they override it with a regular method. This is fine as far as Python is concerned but PyLint doesn't like the `self` parameters adding an argument to the method. All colorschemes should actually implement the `use` method anyway so making it an `@abstractmethod` seems appropriate and allows us to include the `self` argument.
* | Merge remote-tracking branch 'ferdinandyb/ipynb_preview'toonn2022-04-011-1/+9
|\ \
| * | better textual preview for jupyter notebooksBence Ferdinandy2021-12-291-1/+9
| | |
* | | scope: Fix draw.io width and enable by defaulttoonn2022-03-181-4/+4
| | |
* | | scope: Move draw.io preview to handle_imagetoonn2022-03-181-18/+17
| | |
* | | fix indentNici2022-02-131-1/+1
| | |
* | | add drawio Image-PreviewNici2022-02-131-1/+6
| |/ |/|
* | vcs: Switch from deprecated isSet to is_settoonn2022-02-051-3/+3
| |
* | config.pylintrc: Don't consider f-stringstoonn2022-02-051-1/+1
| |
* | img_display: Use `in` Pythonismtoonn2022-02-051-1/+1
| |
* | loader: Use `in` Pythonismtoonn2022-02-051-1/+1
| |
* | file: Use `in` Pythonismtoonn2022-02-051-1/+1
| |
* | Revert "vcs: Drop disappeared Pylint options"toonn2022-02-051-0/+2
| | | | | | | | This reverts commit 8b462b245399af66bb2b7dd31ed360548804416b.
* | Revert "rifle: Drop disappeared Pylint options"toonn2022-02-051-1/+3
| | | | | | | | This reverts commit 742d02c05890c9d2477cad6138853088a28a83e8.
* | Revert "popen_forked: Drop disappeared Pylint options"toonn2022-02-051-1/+1
| | | | | | | | This reverts commit 90380564ca41429771441f1e3cb3cc606ca5e101.
* | Revert "macrodict: Drop disappeared Pylint options"toonn2022-02-051-1/+1
| | | | | | | | This reverts commit ade69eb05c5791fe02736cf761d3162dd04fb412.
* | Revert "img_display: Drop disappeared Pylint options"toonn2022-02-051-0/+2
| | | | | | | | This reverts commit 7ae3f6e2ed2ff6648f4a13d276b6e6b586592720.
* | Revert "runner: Drop disappeared Pylint options"toonn2022-02-051-0/+2
| | | | | | | | This reverts commit 05af3b99d87ade639cfb8dd33acda9c76d5e93e5.
* | Revert "loader: Drop disappeared Pylint options"toonn2022-02-051-0/+1
| | | | | | | | This reverts commit c3824a59b28fa4895e44718edebc144859eac233.
* | Revert "actions: Drop disappeared Pylint options"toonn2022-02-051-0/+5
| | | | | | | | This reverts commit 3f5cae584e56ca47e7460dd2634d0b10b3787a9d.
* | Revert "tags: Drop Pylint option that disappeared"toonn2022-02-051-0/+1
| | | | | | | | This reverts commit aa98a9a39eb2c5df10bb19b94ade3a98863470c4.
* | vcs: Drop disappeared Pylint optionstoonn2022-02-051-2/+0
| |
* | rifle: Drop disappeared Pylint optionstoonn2022-02-051-3/+1
| |
* | popen_forked: Drop disappeared Pylint optionstoonn2022-02-051-1/+1
| |
* | macrodict: Drop disappeared Pylint optionstoonn2022-02-051-1/+1
| |
* | img_display: Drop disappeared Pylint optionstoonn2022-02-051-2/+0
| |
* | runner: Drop disappeared Pylint optionstoonn2022-02-051-2/+0
| |
* | loader: Drop disappeared Pylint optionstoonn2022-02-051-1/+0
| |
* | actions: Drop disappeared Pylint optionstoonn2022-02-051-5/+0
| |
* | tags: Drop Pylint option that disappearedtoonn2022-02-051-1/+0
| |
* | Fix broken case statement (scope.sh does have tests, and they failed...)Sami Kankaristo2021-12-291-0/+1
| |
* | Add rsvg-convert for SVG previewsSami Kankaristo2021-12-291-3/+4
|/ | | | | | | `rsvg-convert` works much more reliably for SVGs than ImageMagick's `convert`, which freezes with large SVGs (seems to convert formats first, and resize only after that), and can drop out text during the conversion. Support for SVGs isn't great in ImageMagick, since it's a raster graphics program. `rsvg-convert` only supports conversion to PNG. The image preview works fine with PNGs, but Ranger assumes/requires a .jpg extension, so the file is just renamed from `xxx.jpg.png` to `xxx.jpg`. It's a bit of an ugly hack, but it works, and it's faster than a second image conversion from PNG to JPEG (and vector graphics usually look better with PNG than with JPEG, which is meant more for photos). On Ubuntu and Debian, `rsvg-convert` is in the `librsvg2-bin` package.
* broke up cases for OpenOffice docs, so ods/odp files would not use pandocShervin Sahba2021-12-131-1/+5
|
* scope: Remove exit to fallback in case of no thumbnailtoonn2021-11-111-2/+2
|
* thumbnail preview for audiopirate4867431862021-11-111-0/+6
|