diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-18 14:34:33 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-18 17:37:37 +0200 |
| commit | a9fb53c81cec2008acc0ff3fc808ca5bd32f317e (patch) | |
| tree | 7f3692a8105bda4844ac232ebf248ec3268bd315 /editor.h | |
| parent | 3eaa312c0babe1264d5f4408f82310cd1458dd02 (diff) | |
| download | vis-a9fb53c81cec2008acc0ff3fc808ca5bd32f317e.tar.gz vis-a9fb53c81cec2008acc0ff3fc808ca5bd32f317e.tar.xz | |
Clean up window splitting API
Diffstat (limited to 'editor.h')
| -rw-r--r-- | editor.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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*); |
