kevinhwang91 / rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
BSD 3-Clause "New" or "Revised" License
800 stars 17 forks source link

Base directory of other tabs changes when opening a file in a different tab #135

Closed twidxuga closed 1 year ago

twidxuga commented 1 year ago

OS ~

Ranger ~

Python ~

Pynvim ~

Ueberzug (optional) ~

RPC ~

Example: tab 1 has base folder A, tab 2 has base folder B, If I open a file in tab 2 nothing happens, but if afterwards we open a file in tab 1 then base folder of tab 2 becomes A instead of B.

To Reproduce using nvim -u mini.vim

Example: cat mini.vim

call plug#begin('~/.config/nvim/plugged')
Plug 'kevinhwang91/rnvimr'
call plug#end()

let g:rnvimr_vanilla = 0
let g:rnvimr_enable_ex = 1

nnoremap <silent> - :RnvimrToggle<CR>
nnoremap <silent> <leader>- :e .<CR>

Steps to reproduce the behavior:

  1. Open nvim and change the base directory with :tcd A (tab 1)
  2. Create a new tab with :tabnew and change the base directory with :tcd B (tab 2)
  3. Open a file in tab 2 with nvimr
  4. Check that the base directory of both tabs is still different with :pwd, changing between tabs with gt.
  5. Open a file in tab 1 with nvimr
  6. Check that the base directory of tab 1 remains the same BUT the base directory of tab 2 has changed to A, therefore both tabs have the same base directory now!

Expected behaviour No unexpected changes of base folder for other tabs should occur when opening files in a tab.

kevinhwang91 commented 1 year ago

Thanks, fixed.

twidxuga commented 1 year ago

Just tested, can't reproduce it anymore. Many thanks. Love this plugin btw!