API: Implement window_get_position

This commit is contained in:
Thiago de Arruda 2014-05-11 10:37:54 -03:00
parent 6226ac34fd
commit 3ed2ddf726
2 changed files with 11 additions and 3 deletions

View File

@ -157,9 +157,17 @@ void window_set_option(Window window, String name, Object value, Error *err)
set_option_to(win, SREQ_WIN, name, value, err);
}
Position window_get_pos(Window window, Error *err)
Position window_get_position(Window window, Error *err)
{
abort();
Position rv;
win_T *win = find_window(window, err);
if (win) {
rv.col = win->w_wincol;
rv.row = win->w_winrow;
}
return rv;
}
Tabpage window_get_tabpage(Window window, Error *err)

View File

@ -96,7 +96,7 @@ void window_set_option(Window window, String name, Object value, Error *err);
/// @param window The window handle
/// @param[out] err Details of an error that may have occurred
/// @return The (row, col) tuple with the window position
Position window_get_pos(Window window, Error *err);
Position window_get_position(Window window, Error *err);
/// Gets the window tab page
///