voldikss / vim-floaterm

:computer: Terminal manager for (neo)vim
MIT License
2.5k stars 81 forks source link

Opening Floaterm changes all the other tabs pwd to the current one #287

Closed baldore closed 3 years ago

baldore commented 3 years ago

Environment

NVIM v0.5.0-dev+91cdc1198
Build type: Release
LuaJIT 2.1.0-beta3

If you are using neovim, just run :checkhealth floaterm and post the content below.

health#floaterm#check
========================================================================
## common
  - INFO: Platform: macos
  - INFO: Nvim: NVIM v0.5.0-dev+91cdc1198
  - INFO: Plugin: b774770

## terminal
  - OK: Terminal emulator is available

## floating
  - OK: Floating window is available

Configurations related to vim-floaterm in vimrc(i.e. g:floaterm_xxx):

let g:floaterm_autoclose = 1
let g:floaterm_width = 0.95
let g:floaterm_height = 0.95

nnoremap <leader>gl :<C-u>FloatermNew lazygit<cr>

command Conf FloatermNew lazygit --git-dir=$HOME/.cfg/ --work-tree=$HOME

Steps to reproduce

Using the minimal vimrc

call plug#begin('~/.config/nvim/plugged')

Plug 'voldikss/vim-floaterm'

call plug#end()

Steps to reproduce the behavior:

Actual behaviour

There's a bug when working with multiple tabs. If each tab has its own working directory using tcd and you call FloatermNew, it changes other tabs working directory to the current one.

Tried with a minimal setup and it still happens.

Expected behaviour

It should not change the current working directory of the other tabs.

Screenshots(Optional, GIF is better)

demo

thenewvu commented 1 year ago

@voldikss I believe this commit causes this bug again sometime