api: unify buffer numbers and window ids with handles

also allow handle==0 meaning curbuf/curwin/curtab
This commit is contained in:
Björn Linse
2016-06-19 21:06:03 +02:00
parent 3bd3b3b768
commit a2d25b7bf8
15 changed files with 98 additions and 84 deletions

View File

@@ -472,7 +472,7 @@ void vim_set_current_buffer(Buffer buffer, Error *err)
if (!try_end(err) && result == FAIL) {
api_set_error(err,
Exception,
_("Failed to switch to buffer %" PRIu64),
_("Failed to switch to buffer %d"),
buffer);
}
}
@@ -522,7 +522,7 @@ void vim_set_current_window(Window window, Error *err)
if (!try_end(err) && win != curwin) {
api_set_error(err,
Exception,
_("Failed to switch to window %" PRIu64),
_("Failed to switch to window %d"),
window);
}
}
@@ -573,7 +573,7 @@ void vim_set_current_tabpage(Tabpage tabpage, Error *err)
if (!try_end(err) && tp != curtab) {
api_set_error(err,
Exception,
_("Failed to switch to tabpage %" PRIu64),
_("Failed to switch to tabpage %d"),
tabpage);
}
}