ap / vim-buftabline

Forget Vim tabs – now you can have buffer tabs
http://www.vim.org/scripts/script.php?script_id=5057
MIT License
782 stars 75 forks source link

Better error for calling `<Plug>BufTabLine.Go` beyond available buffers #26

Closed moll closed 7 years ago

moll commented 7 years ago

Hey!

So far it seems like a great lightweight plugin. So much more performant than MiniBufExplorer and Airline. Thanks!

Would you mind improving the error message when calling <Plug>BufTabLine.Go beyond the available buffers? Given 3 buffers, calling <Plug>BufTabLine.Go(4) throws a two-line error with a prompt to press Enter at the end:

E684: list index out of range: 4
E15: Invalid expression: 'b'.buftabline#user_buffers()[4]

The "Press Enter" requirement from Vim is slightly too disruptive. Maybe limit that to a one-liner.

Thanks and cheers!

ap commented 7 years ago

Well… the plugin itself isn’t throwing any error, that’s Vim complaining. But that’s just nitpicking.

Yes of course it should do something less noisy than spamming the command line and asking for a keypress. Thank you for the report – I can’t believe it never occurred to me to test that case.

ap commented 7 years ago

Fixed. Share and enjoy. 😊

moll commented 7 years ago

Superb. Thank you!