Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command-T stops working after deleting its hidden buffer #342

Closed
JavierParra opened this issue Sep 19, 2018 · 4 comments
Closed

Command-T stops working after deleting its hidden buffer #342

JavierParra opened this issue Sep 19, 2018 · 4 comments

Comments

@JavierParra
Copy link

JavierParra commented Sep 19, 2018

As the title mentions, command-t stops working after deleting its buffer.

I'm using neovim v0.3.0.

Steps to reproduce:

  • Open any file.
  • Run :CommandT
  • Close command-t window
  • Run %bwipe
  • Run :CommandT
  • You should get the following error:
.vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:157:in `rescue in buffer_number'
 .vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:155:in `buffer_number'
 .vim/bundle/command-t/ruby/command-t/lib/command-t/match_window.rb:76:in `initialize'
 .vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:366:in `new'
 .vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:366:in `show'
 .vim/bundle/command-t/ruby/command-t/lib/command-t/controller.rb:147:in `show_file_finder'
(eval):3:in `show_file_finder'
eval:1:in `<main>'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:45:in `eval'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:45:in `block (2 levels) in __define_ruby_execute'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:101:in `block (2 levels) in __wrap_client'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:123:in `__with_std_streams'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:100:in `block in __wrap_client'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:109:in `__with_exception_handling'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:99:in `__wrap_client'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/ruby_provider.rb:44:in `block in __define_ruby_execute'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/plugin/handler.rb:51:in `call'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/host.rb:98:in `block in wrap_plugin_handler'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/host.rb:36:in `handle'
/usr/local/lib/ruby/gems/2.5.0/gems/neovim-0.7.1/lib/neovim/host.rb:28:in `block in run'
Error detected while processing function commandt#FileFinder:
line    2:
NameError: uninitialized constant Vim::DeletedBufferError

Edit: Pinpointed the real culprit and simplified steps to reproduce.

@JavierParra JavierParra changed the title Command-T stops working after switching sessions with ProSession Command-T stops working after deleting its hidden buffer Sep 19, 2018
@JavierParra
Copy link
Author

The following simple (albeit ugly) patch fixes the error:
deleted-buffer.diff.txt

@wincent
Copy link
Owner

wincent commented Sep 19, 2018

Awesome. Thanks. It may be ugly, but error-handling often is.

@wincent
Copy link
Owner

wincent commented Sep 19, 2018

Thanks for the detailed bug report and the suggested fix @JavierParra. I just cut 5.0.3 with a fix included.

@JavierParra
Copy link
Author

Great! Thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants