From a9fb53c81cec2008acc0ff3fc808ca5bd32f317e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 18 Sep 2014 14:34:33 +0200 Subject: Clean up window splitting API --- editor.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'editor.h') diff --git a/editor.h b/editor.h index bb20fdb..3b750e9 100644 --- a/editor.h +++ b/editor.h @@ -125,17 +125,17 @@ bool editor_syntax_load(Editor*, Syntax *syntaxes, Color *colors); void editor_syntax_unload(Editor*); /* creates a new window, and loads the given file. if filename is NULL - * an unamed / empty buffer is created */ + * an unamed / empty buffer is created. If the given file is already opened + * in another window, share the underlying text that is changes will be + * visible in both windows */ bool editor_window_new(Editor*, const char *filename); /* reload the file currently displayed in the window from disk */ bool editor_window_reload(EditorWin*); void editor_window_close(EditorWin*); -/* if filename is non NULL it is equivalent to window_new call above. - * if however filename is NULL a new window is created and linked to the - * same underlying text as the currently selected one. changes will - * thus be visible in both windows. */ -void editor_window_split(Editor*, const char *filename); -void editor_window_vsplit(Editor*, const char *filename); +/* split the given window either horizontally or vertically, changes to + * the displayed text will be reflected in both windows */ +bool editor_window_split(EditorWin*); +bool editor_window_vsplit(EditorWin*); /* focus the next / previous window */ void editor_window_next(Editor*); void editor_window_prev(Editor*); -- cgit v1.2.3