junegunn / junegunn/fzf.vim

Neovim terminal buffer scroll offset when invoked through mapping (layout: window: enew)

Open
#385 7 comments 10 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
10.3k
Forks
608
Avg merge
5d 8h
Merged PRs (30d)
2

Description

- Category
- [ ] Question
- [x] Bug
- [ ] Suggestion
- OS
- [x] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
- Vim
- [ ] Vim
- [x] Neovim

Minimal config:
```vim
set runtimepath+=~/.vim/plugged/fzf.vim/
let g:fzf_command_prefix = 'FZF'
let g:fzf_history_dir = '~/.local/share/fzf-history'
if has('nvim')
let g:fzf_layout = { 'window': 'enew' }
endif
nnoremap ,ff :FZFFiles
set nowrap
```

Steps:
1. Open a file with a long line / or insert it
2. Scroll to the right, e.g. by going to the end of the line and/or using `zL` etc
3. Invoke `FZFFiles` through the mapping: `,ff`

Result:
The files are not visible / cut off at the left.
Exiting insert mode in the terminal buffer will make them visible (` `).

This does not happen when invoking it through `:FZFFiles` (instead of using the mapping).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.