Repository: vim-vdebug/vdebug

Issue #305: Vdebug calculates source window incorrectly in Neovim
Created: 2017-10-08T20:29:32Z
When using neovim and trying to debug something that's further away from the first windows, it breaks the layout, or even throws an exception. Here I had 6 tabs opened and 7th was my source file with breakpoint:
Vim:
- [Info] {Sat 07 2017 12:58:28} Searching for win by name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:58:28} Win 1, name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:58:28} Returning window number 1
- [Info] {Sat 07 2017 12:58:28} Found window 1, activating
- [Info] {Sat 07 2017 12:58:28} Found connection from ('127.0.0.1', 37240)
....

Neovim:
- [Info] {Sat 07 2017 12:52:22} Searching for win by name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:52:22} Win 1, name 
- [Info] {Sat 07 2017 12:52:22} Win 2, name 
- [Info] {Sat 07 2017 12:52:22} Win 3, name 
- [Info] {Sat 07 2017 12:52:22} Win 4, name 
- [Info] {Sat 07 2017 12:52:22} Win 5, name 
- [Info] {Sat 07 2017 12:52:22} Win 6, name 
- [Info] {Sat 07 2017 12:52:22} Win 7, name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:52:22} Returning window number 7
- [Info] {Sat 07 2017 12:52:22} Found window 7, activating
- [Info] {Sat 07 2017 12:52:22} Closing the connection
- [Debug] {Sat 07 2017 12:52:22} Command: stop -i 1
- [Debug] {Sat 07 2017 12:52:22} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="1" status="stopped" reason="ok"></response>
- [Debug] {Sat 07 2017 12:52:22} Closing the socket
- [ERROR] {Sat 07 2017 12:52:22} An error occured: <class 'neovim.api.nvim.NvimError'>
Traceback (most recent call last):
  File "/home/vagrant/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 31, in run
    self.runner.run()
  File "/home/vagrant/.vim/vdebug/plugin/python/vdebug/runner.py", line 184, in run
    self.open()
  File "/home/vagrant/.vim/vdebug/plugin/python/vdebug/runner.py", line 48, in open
    self.ui.open()
  File "/home/vagrant/.vim/vdebug/plugin/python/vdebug/ui/vimui.py", line 80, in open
    raise e
NvimError: Vim(wincmd):E16: Invalid range


It seems that vim-python manages windows differently in vim and neovim. In vim it is managed by-tab, in neovim it is managed globally
vim -c "vsplit" -c "tabnew" -c "py import vim"
:py print len(vim.windows)

Vim outputs 1
Neovim outputs 3
I hacked some sort of a PR, maybe you have more sophisticated idea what is going on and how to fix better.

Duplicate issue #301: vdebug can't open ui on connection
Created: 2017-09-07T04:09:32Z
my setup:

vdebug: 96b51f3
neovim: 0.2.0
python2: 2.7.13
pip-neovim: 0.1.13

vdebug can't open the ui upon connection. I have to hit escape, which triggers the following error, after which the UI opens and I can connect as normal.
- [Debug] {Wed 06 2017 23:03:15} Closing the socket
- [ERROR] {Wed 06 2017 23:03:15} An error occured: <class 'neovim.api.nvim.NvimError'>
Traceback (most recent call last):
  File "/Users/seagoj/dotfiles/nvim/.config/nvim/plugged/vdebug/plugin/python/start_vdebug.py", line 31, in run
    self.runner.run()
  File "/Users/seagoj/dotfiles/nvim/.config/nvim/plugged/vdebug/plugin/python/vdebug/runner.py", line 184, in run
    self.open()
  File "/Users/seagoj/dotfiles/nvim/.config/nvim/plugged/vdebug/plugin/python/vdebug/runner.py", line 48, in open
    self.ui.open()
  File "/Users/seagoj/dotfiles/nvim/.config/nvim/plugged/vdebug/plugin/python/vdebug/ui/vimui.py", line 79, in open
    raise e
NvimError: Vim(wincmd):E16: Invalid range

Thanks in advance for any help you can give me.

Closing comment (2017-10-08T20:33:44Z): related to #305  ?