Closed laggardkernel closed 3 years ago
I have a hint to solve this issue. Thanks. The border of rnvimr drew by builtin curses in ranger instead of simulate border with nvim_open_win()
. There was also an issue relate to it before.
https://github.com/kevinhwang91/rnvimr/issues/69
Did you try M-o
again?
Did you try
M-o
again?
If you mean if I tried to toggle ranger
after content is misaligned, yes I did try to redisplay it with M-o. Only quitting ranger
with :quit!
fixes the problem.
I can reproduce this issue neither in ArchLinux nor in macOS. You'd try another terminal or make your shell environment clean.
Apology for the issue reported. It's a bug of my terminfo xterm-256color
.
After you tell me you can't reproduce it on your side. I re-checked thoroughly and located the cause. macOS uses an old ncurses
5.7, the xterm-256color
within which doesn't have some font features like italic, strikethrough, undercurl. To get support for them, I chose to dump a new one from the brew installed ncurses
6.2, and compile it to be used for the system ncurses
5.7.
From what I heard, I only need to fix the color capability part to make this new terminfo work with the old ncurses 5.7. Obviously, from what I experience today, this is not the case.
Checking from eval os.environ.get("TERM")
, ranger
always choose this broken terminfo no matter what terminal I am using.
Sorry again for your time spent to help me found out the cause.
Solved: It's caused by my buggy terminfo. The plugin works well.
nvim --version
: v0.4.4Describe the bug
I've implemented
z
andv
in my ranger for quick directory jumping, which basically passes some directory list tofzf
and let you select one. Something is broken whenlet g:rnvimr_draw_border = 1
is enabled.To Reproduce using
nvim -u mini.vim
Let's get right to the point.
First enable
let g:rnvimr_draw_border = 1
. Secondly, open yourranger
config, create a custom command incommands.py
.Trigger
ranger
withinnvim
with M-o, and you wanna type:test
and press Enter. Then thefzf
window pops up with the file, directory listed from your home directory byls -al
. PressESC
to quit thefzf
window.Now, we're back to
ranger
. Check the border of the floating window created innvim
. You're expected to find the right corner element┘
is lost and printed to the next line!!! Not only that, usej
,k
to move the cursor inranger
, you'll find the content is misaligned.I don't know if the following will help you. But better tell you what I've tried.
My first impression is switching to
nnn.vim
to have a test.nnn.vim
doesn't support usingranger
directly. But because it only usesnnn
as a picker with commandnnn -p
, it could be easily achieved to switch toranger --choosefiles
by modifying the source code.Anyway, I tried popping up
ranger
with a border withnnn.vim
. It turns out there's no the above problem.By checking its code, the border used in
nnn.vim
is drew with symbol characters manually. To be specific, the border calculation code is borrowed fromfzf
directly. https://github.com/mcchrish/nnn.vim/commit/6da76e936ecff13a06a4de8a99997db1e6c8a2c8I haven't dig it deeper. Not sure if drawing border manually with symbol characters is related with the bug i'm reporting.