From 6c5bdddbb5e7f79a04a0ee2bd7a9252035151812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 11 Sep 2014 15:52:32 +0200 Subject: Add :edit command --- window.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'window.c') 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; -- cgit v1.2.3