You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output of :echo &pythonthreedll(only vim, not neovim):
Output of :py print(sys.version): 3.11.4 (v3.11.4:d2340ef257, Jun 6 2023, 19:15:51) [Clang 13.0.0 (clang-1300.0.29.30)]
Output of :py3 print(sys.version): Same as above
Output of :echo g:Lf_Debug_Cmd:
Output of :echo g:Lf_FilesFromCache:
Operating system:
Linux
Mac OS X
Windows
Etc.
Configurations related to LeaderF in vimrc:
" Cache file for faster file search, use <F5> to refreshletg:Lf_UseCache=1" Refresh each time we call leaderfletg:Lf_UseMemoryCache=0" Open a new window in the current tab (I don't need this because I am using bufferline)" let g:Lf_JumpToExistingWindow = 0" Ignore certain files and directories when searching filesletg:Lf_WildIgnore= {
\ 'dir': ['.git', '__pycache__', '.DS_Store'],
\ 'file': ['*.exe', '*.dll', '*.so', '*.o', '*.pyc', '*.jpg', '*.png',
\ '*.gif', '*.svg', '*.ico', '*.db', '*.tgz', '*.tar.gz', '*.gz',
\ '*.zip', '*.bin', '*.pptx', '*.xlsx', '*.docx', '*.pdf', '*.tmp',
\ '*.wmv', '*.mkv', '*.mp4', '*.rmvb', '*.ttf', '*.ttc', '*.otf',
\ '*.mp3', '*.aac', '*.orig', '*.min.js', '*-combined.js']
\}" Default Rg configletg:Lf_RgConfig= [
\"--max-columns=500",\"--glob=!tags",\"--glob=!tags.*",\"--glob=!*.min.js",\"--glob=!.git/"\]" Store the last rg search pattern to register rletg:Lf_RgStorePattern="r"" No default limit for search result to allow all files are show in" LeaderfFileletg:Lf_MaxCount=200000" Do not show fancy icons for Linux server.ifg:is_linuxletg:Lf_ShowDevIcons=0endif" Only fuzzy-search files namesletg:Lf_DefaultMode='Regex'letg:Lf_MruFileExclude= ['*.so']
letg:Lf_MruMaxFiles=9999" Do not use version control tool to list files under a directory since" submodules are not searched by default.letg:Lf_UseVersionControlTool=0" Use rg as the default search toolletg:Lf_DefaultExternalTool="rg"" show dot filesletg:Lf_ShowHidden=1" preview in popupletg:Lf_PreviewInPopup=1" set up working directory as current pwd so that I can fine tune search" scopeletg:Lf_WorkingDirectoryMode='c'" Change keybinding in LeaderF prompt mode, use ctrl-n and ctrl-p to navigate items.letg:Lf_CommandMap= {'<C-J>': ['<C-N>'], '<C-K>': ['<C-P>']}
letg:Lf_PreviewCode=0letg:Lf_PreviewResult= {
\ 'File': 0,
\ 'Buffer': 0,
\ 'Mru': 0,
\ 'Tag': 0,
\ 'BufTag': 0,
\ 'Function': 0,
\ 'Line': 0,
\ 'Colorscheme': 0,
\ 'Rg': 0,
\ 'Gtags': 0\}letg:Lf_FolderAcceptSelectionCmd='Dirbuf'
Describe your question, feature request, or bug.
After performing a --stayOpenrg search and use <Enter> to open the target file, attempting to close the search result window with <c-w>o will cause an Autocommands caused command to abort error.
Steps to reproduce
Run command: Leaderf! rg --regexMode --hidden --stayOpen -e "require" ("require" can be changed to another search keyword)
The result window shows up as a split window in the bottom, press <Enter> on a result entry, the targeted file will open in the top split window, and get the focus.
In the targeted file window, use <c-w>o to close other windows
Actual behaviour
The result window will take up all the space and the targeted file window will disappear. Pressing <ESC> can close the search result window and bring back the target file buffer. However Leaderf! rg --recall will show the following error message and the result list will be gone.
Error detected while processing function leaderf#Any#start[4]..leaderf#LfPy[1]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 4 (python3-script-host):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/zd/.local/share/nvim/lazy/LeaderF/autoload/leaderf/python/leaderf/anyExpl.py", line 838, in start
the_args.start(arguments, *args, **kwargs)
File "/Users/zd/.local/share/nvim/lazy/LeaderF/autoload/leaderf/python/leaderf/anyExpl.py", line 756, in _default_action
manager.startExplorer(win_pos[2:], *args, **kwargs)
File "/Users/zd/.local/share/nvim/lazy/LeaderF/autoload/leaderf/python/leaderf/rgExpl.py", line 1187, in startExplorer
super(RgExplManager, self).startExplorer(win_pos, *args, **kwargs)
File "/Users/zd/.local/share/nvim/lazy/LeaderF/autoload/leaderf/python/leaderf/manager.py", line 2757, in startExplorer
or pattern[0] == "'" and pattern[-1] == "'"):
^^^^^^^^^^^^^^^^^
File "/Users/zd/.local/share/nvim/lazy/LeaderF/autoload/leaderf/python/leaderf/rgExpl.py", line 959, in _bangEnter
instance.window.cursor = (instance.cursorRow, 0)
^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pynvim/api/window.py", line 27, in cursor
return self.request('nvim_win_set_cursor', pos)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pynvim/api/common.py", line 58, in request
return self._session.request(name, self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Cursor position outside buffer
Expected behaviour
<c-w>o in the targeted file window should close the result window without error and the result window can be recalled.
The text was updated successfully, but these errors were encountered:
dengzhizhi
changed the title
<C-W>o causes Autocommands cuased command to abort errorJul 4, 2024
I have tried disabling all other plugins and my other vim configs, only with the LeaderF plugin and the above LeaderF related configuration, still had the same issue.
vim --version
ornvim --version
::echo has("python")
: 0:echo has("python3")
: 1:echo &pythondll
(only vim, not neovim)::echo &pythonthreedll
(only vim, not neovim)::py print(sys.version)
:3.11.4 (v3.11.4:d2340ef257, Jun 6 2023, 19:15:51) [Clang 13.0.0 (clang-1300.0.29.30)]
:py3 print(sys.version)
: Same as above:echo g:Lf_Debug_Cmd
::echo g:Lf_FilesFromCache
:Describe your question, feature request, or bug.
After performing a
--stayOpen
rg search and use<Enter>
to open the target file, attempting to close the search result window with<c-w>o
will cause an Autocommands caused command to abort error.Steps to reproduce
Leaderf! rg --regexMode --hidden --stayOpen -e "require"
("require" can be changed to another search keyword)<Enter>
on a result entry, the targeted file will open in the top split window, and get the focus.<c-w>o
to close other windowsActual behaviour
The result window will take up all the space and the targeted file window will disappear. Pressing
<ESC>
can close the search result window and bring back the target file buffer. HoweverLeaderf! rg --recall
will show the following error message and the result list will be gone.Expected behaviour
<c-w>o
in the targeted file window should close the result window without error and the result window can be recalled.The text was updated successfully, but these errors were encountered: