Closed glassesneo closed 5 months ago
Please don't use Lua config.
And your config is not minimal config.
I have created the minimal vimrc. Please test it with the config.
set rtp+=~/work/ddu.vim
set rtp+=~/work/ddu-ui-ff
set rtp+=~/work/ddu-ui-filer
set rtp+=~/work/denops.vim
set rtp+=~/work/ddu-kind-file
set rtp+=~/work/ddu-column-filename
set rtp+=~/work/ddu-source-file
set autochdir
lua <<EOF
local doAction = vim.fn["ddu#ui#async_action"]
vim.fn["ddu#custom#patch_local"]("filer", {
ui = "filer",
uiParams = {
filer = {
split = "floating",
splitDirection = "floating",
floatingBorder = "rounded",
previewFloating = true,
previewFloatingBorder = "rounded",
previewFloatingTitle = "Preview",
previewSplit = "horizontal",
},
},
sources = { "file" },
sourceOptions = {
file = {
columns = {
"filename",
},
},
},
})
---@param mode string|string[]
---@param key string
---@param action string
---@param args? table
local function mapAction(mode, key, action, args)
vim.keymap.set(mode, key, function()
if args ~= nil and next(args) then
doAction(action, args)
else
doAction(action)
end
end, { noremap = true, silent = true, buffer = true })
end
vim.api.nvim_create_autocmd("FileType", {
pattern = "ddu-filer",
callback = function()
mapAction("n", "q", "quit")
mapAction("n", "<CR>", "itemAction", { name = "open" })
mapAction("n", "l", "expandItem")
end,
})
EOF
nnoremap <Space><Space> <Cmd>call ddu#start(#{ name: 'filer' })<CR>
call ddu#start(#{ name: 'filer' })
I don't reproduce your behavior.
I'm terribly sorry for not getting what the minimal vimrc means. Also, thank you for your hard work.
Although I had tested ddu with your minimal vimrc, I got the same behavior. (All the plugins used in the test have already been updated to the latest version)
https://github.com/Shougo/ddu.vim/assets/61031352/f4307cdb-82ea-426d-a934-2b6611aa271e
Also, I realized that the lua config I showed first does not have columns options set in sourceOptions, but that didn't change any situations.
Fixed. Please update ddu-ui-filer
.
Problems summary
autochdir
を有効にした状態で特定の手順を踏むと、ddu#start()
で最初に表示される画面がカラムの途中になるEnvironment Information
ddu.vim version (SHA1): a77be8b90da60b5980fee2dc37ef42bc12dd0a23
denops.vim version (SHA1): 9dd9ae9da9b8d65916dd44e0e4d881665397de63
deno version(
deno -V
output): deno 1.43.5OS: MacOS Sonoma 14.5 (M1, 2020)
neovim/Vim
:version
output: NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068config
How to reproduce the problem from neovim/Vim startup (Required!)
autochdir
が有効な状態で、ddu#start()
を上記の設定で実行ddu#start()
を実行すると ※ 2でopenしたファイルが最初のdduの画面で下のほうにあるほど、3で最初に表示される画面が下にズレるScreenshot (if possible)
動画内ではexpandしたディレクトリの中のファイルをopenしているが他のファイルをopenした場合でも同様に発生を確認
https://github.com/Shougo/ddu.vim/assets/61031352/0c83aaeb-0a31-43a8-b01a-c61f0e208d01