api: deprecate obsolete nvim_buf_get_number function

This commit is contained in:
Björn Linse
2017-04-30 09:16:11 +02:00
parent 0df1b6655b
commit 97126bfa02
4 changed files with 15 additions and 1 deletions

View File

@@ -567,11 +567,15 @@ void nvim_buf_set_option(Buffer buffer, String name, Object value, Error *err)
/// Gets the buffer number
///
/// @deprecated The buffer number now is equal to the object id,
/// so there is no need to use this function.
///
/// @param buffer Buffer handle
/// @param[out] err Error details, if any
/// @return Buffer number
Integer nvim_buf_get_number(Buffer buffer, Error *err)
FUNC_API_SINCE(1)
FUNC_API_DEPRECATED_SINCE(2)
{
Integer rv = 0;
buf_T *buf = find_buffer_by_handle(buffer, err);