diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-21 00:48:56 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-21 00:50:22 -0700 |
commit | 614c72180dc0424528bec91286b8520d0daf18c2 (patch) | |
tree | 2fb3dc1758097b086e0b91cf623b843ec2e33c71 /run_vim.py | |
parent | 79fbfe964e3770ffec7c60bd2a6ed326e92504b5 (diff) | |
download | config.vim-614c72180dc0424528bec91286b8520d0daf18c2.tar.gz config.vim-614c72180dc0424528bec91286b8520d0daf18c2.tar.bz2 config.vim-614c72180dc0424528bec91286b8520d0daf18c2.zip |
fix(run_nvim.py): fix bug where --float would crash with no file arguments
Diffstat (limited to 'run_vim.py')
-rwxr-xr-x | run_vim.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -43,6 +43,8 @@ nvim = neovim.attach('socket', path=nvim_socket) existing_buffers = get_listed_buffers(nvim) if '--float' in sys.argv: + + float_title = filenames[0] if len(filenames) > 0 else "" nvim.command( 'call nvim_open_win(0, 1, {' + "'relative': 'editor'," + @@ -53,7 +55,7 @@ if '--float' in sys.argv: "'anchor': 'NW'," + "'style': 'minimal'," + "'border': 'single'," + - "'title': [['" + filenames[0] + "', 'Statement']]" + + "'title': [['" + float_title + "', 'Statement']]" + "})"); nvim.command("set winhighlight=Normal:Normal") else: |