aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/window.c b/window.c
index 931c4dc..4a80331 100644
--- a/window.c
+++ b/window.c
@@ -463,6 +463,12 @@ void window_free(Win *win) {
free(win);
}
+void window_reload(Win *win, Text *text) {
+ win->text = text;
+ window_selection_clear(win);
+ window_cursor_to(win, 0);
+}
+
Win *window_new(Text *text) {
if (!text)
return NULL;