Merge pull request #181 from lodagro/vim74_ValueError

Catch ValueError, close #180.
This commit is contained in:
David Halter
2013-09-04 06:43:07 -07:00
2 changed files with 2 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ Emily Strickland (@emilyst) <mail@emily.st>
Tin Tvrtković (@Tinche) <tinchester@gmail.com> Tin Tvrtković (@Tinche) <tinchester@gmail.com>
Zekeriya Koc (@zekzekus) <zekzekus@gmail.com> Zekeriya Koc (@zekzekus) <zekzekus@gmail.com>
ethinx (@ethinx) <eth2net@gmail.com> ethinx (@ethinx) <eth2net@gmail.com>
Wouter Overmeire (@lodagro) <lodagro@gmail.com>
@something are github user names. @something are github user names.

View File

@@ -436,7 +436,7 @@ def _tabnew(path, options=''):
buf_nr = int(buf_nr) - 1 buf_nr = int(buf_nr) - 1
try: try:
buf_path = vim.buffers[buf_nr].name buf_path = vim.buffers[buf_nr].name
except LookupError: except (LookupError, ValueError):
# Just do good old asking for forgiveness. # Just do good old asking for forgiveness.
# don't know why this happens :-) # don't know why this happens :-)
pass pass