## 事象 1. [[ウィンドウ (Vim)|ウィンドウ]]を2つ開く 2. 片方のウィンドウで`:Oil` で [[oil.nvim]]の[[バッファ (Vim)|バッファ]]を開く 3. 2のウィンドウで[[snacks.picker]]で `Snacks.picker.smart()` を実行する 4. 結果を選択 or キャンセルする [[oil.nvim]]ではない[[ウィンドウ (Vim)|ウィンドウ]]にカーソルが移ってしまう。期待値は[[oil.nvim]]が表示されていた[[ウィンドウ (Vim)|ウィンドウ]]にカーソルが存在すること。 ### 環境 | 対象 | バージョン | | --------------- | ----------- | | [[Ubuntu]] | 24.04.1 LTS | | [[Neovim]] | 0.10.3 | | [[snacks.nvim]] | `bc0630e` | | [[oil.nvim]] | `ab887d9` | ## 原因 仕様。 <div class="link-card-v2"> <div class="link-card-v2-site"> <img class="link-card-v2-site-icon" src="https://github.githubassets.com/favicons/favicon.svg" /> <span class="link-card-v2-site-name">GitHub</span> </div> <div class="link-card-v2-title"> bug: picker does not reuse window buffer/window if opened from oil · Issue #618 · folke/snacks.nvim </div> <div class="link-card-v2-content"> Did you check docs and existing issues? I have read all the snacks.nvim docs I have updated the plugin to the la ... </div> <img class="link-card-v2-image" src="https://opengraph.githubassets.com/3fea605cd4fb8a6e4f6852a066ae9185a0c029697627b3995c07f8ce380e5956/folke/snacks.nvim/issues/618" /> <a href="https://github.com/folke/snacks.nvim/issues/618"></a> </div> ## 解決方法 `picker.main.current` に `true` を設定する。 ```lua picker = { main = { current = true, }, ```