From 73dbb97f8e51c77bb553a8af645b728543462d26 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 9 May 2014 18:22:37 -0300 Subject: API: Implement window/tabpage switching functions Also moved `find_buffer` to 'api/helpers.c' and removed unnecessary declaration in 'window.h' --- src/api/buffer.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/api/buffer.c') diff --git a/src/api/buffer.c b/src/api/buffer.c index 39c69f1ce7..d5b46943da 100644 --- a/src/api/buffer.c +++ b/src/api/buffer.c @@ -14,8 +14,6 @@ #include "../window.h" #include "undo.h" -static buf_T *find_buffer(Buffer buffer, Error *err); - // Find a window that contains "buf" and switch to it. // If there is no such window, use the current window and change "curbuf". // Caller must initialize save_curbuf to NULL. @@ -198,17 +196,6 @@ Position buffer_mark(Buffer buffer, String name, Error *err) abort(); } -static buf_T *find_buffer(Buffer buffer, Error *err) -{ - buf_T *buf = buflist_findnr(buffer); - - if (buf == NULL) { - set_api_error("Invalid buffer id", err); - } - - return buf; -} - static void switch_to_win_for_buf(buf_T *buf, win_T **save_curwinp, tabpage_T **save_curtabp, -- cgit