Flickering when moving directories using narrow
pddg opened this issue · 2 comments
pddg commented
Problems summary
Flickering may occur when moving directories using narrow. However, it may not occur depending on the terminal emulator used.
There is no functional problem, but it would be nice to know how to prevent it from happening.
Expected
No flicker occurs on either terminal emulator.
Environment Information
-
ddu-ui-filer version (SHA1): e7e05b9
-
denops.vim version (SHA1): 5736b667b40829ab21bedaf7d321de1cc71dbd7f
-
deno version(
deno -V
output): deno 1.29.1 -
OS: macOS 13.1 Apple M1 Pro
-
neovim/Vim
:version
output:NVIM v0.8.1 Build type: Release LuaJIT 2.1.0-beta3 Compiled by brew@HMBRW-A-001-M1-004.local Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.1/share/nvim" Run :checkhealth for more info
Provide a minimal init.vim/vimrc without plugin managers (Required!)
if exists('+compatible') && &compatible
set nocompatible
endif
set runtimepath^=~/.cache/dein/repos/github.com/vim-denops/denops.vim"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu.vim"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-ui-filer"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-source-file"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-kind-file"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-column-filename"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-filter-matcher_substring"
filetype plugin indent on
syntax on
call ddu#custom#patch_global({
\ 'ui': 'filer',
\ 'uiParams': {
\ 'filer': {
\ 'splitDirection': 'topleft',
\ 'split': 'vertical',
\ 'winWidth': '25',
\ },
\ },
\ 'sourceOptions': {
\ '_': {
\ 'matchers': ['matcher_substring'],
\ 'columns': ['filename'],
\ },
\ },
\ 'sources': [{'name': 'file', 'params': {}}],
\ })
autocmd FileType ddu-filer call s:ddu_filer_settings()
function! s:ddu_filer_settings() abort
nnoremap <buffer><silent><expr> <CR>
\ ddu#ui#filer#is_tree() ?
\ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'narrow'})<CR>" :
\ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'open'})<CR>"
nnoremap <buffer><silent> q
\ <Cmd>call ddu#ui#filer#do_action('quit')<CR>
endfunction
How to reproduce the problem from neovim/Vim startup (Required!)
- Start neovim with minimum init.vim e.g
nvim -u init.vim
call ddu#start()
- Move directories
Screenshot (if possible)
Flickering occurred
iTerm2
Build 3.4.18
ddu_ui_flicker_iterm2.mov
wezterm
20221119-145034-49b9839f
ddu_ui_flicker_wezterm.mov
Flickering NOT occurred
macOS's default Terminal.app
ddu_ui_flicker_teminalapp.mov
Upload the log messages by :redir
and :message
(if errored)
No errors.
Shougo commented
OK. Reproduced.
Please set ddu-action-option-quit
.
You need to read the doucumentation...
EXAMPLES *ddu-ui-filer-examples*
>
call ddu#custom#patch_global({
\ 'ui': 'filer',
\ 'actionOptions': {
\ 'narrow': {
\ 'quit': v:false,
\ },
\ },
\ })
autocmd FileType ddu-filer call s:ddu_filer_my_settings()
function! s:ddu_filer_my_settings() abort
nnoremap <buffer> <CR>
\ <Cmd>call ddu#ui#filer#do_action('itemAction')<CR>
nnoremap <buffer> o
\ <Cmd>call ddu#ui#filer#do_action('expandItem')<CR>
endfunction
pddg commented
I had missed that setup. Thank you!