ranger / ranger

A VIM-inspired filemanager for the console
https://ranger.fm
GNU General Public License v3.0
15.32k stars 883 forks source link

Ranger unable to preview a text file #2725

Closed fromtheeast710 closed 1 year ago

fromtheeast710 commented 1 year ago

For some reason Ranger can't preview this text file taken from here evil_lualine 2022-10-27-140905_1366x768_scrot

compare to this file 2022-10-27-140914_1366x768_scrot

tuatara73 commented 1 year ago

You need to add some more info such as:

  1. Which version of ranger are you using.
  2. Which distro and what version. I have fedora 35 and ranger version 1.9.3 and it works perfectly fine
fromtheeast710 commented 1 year ago

@tuatara73 I'm using Ranger ranger 1.9.3 with Python version: 3.10.8 on ArtixLinux 6.0.6.artix1-1.

fromtheeast710 commented 1 year ago

It's weird that only one file is affected by this. I tried removing the config file but nothing changed.

sbradnick commented 1 year ago

There are control (^) codes in the file, w/ them stripped out it previews fine; lines 100 and 106.

fromtheeast710 commented 1 year ago

That worked, thank you. But is there any workaround for this bug that does not require removing those characters?

toonn commented 1 year ago

This is probably caused by whatever syntax highlighting program is processing it. Which of highlight, bat or pygments do you have installed? (Or did, since it's a while ago .)