From 7554ecd77efc29601b7b44deca602724917ce019 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Tue, 21 May 2024 11:27:08 -0600 Subject: remove some view pointer chasing Same as previous commit each window only has a single View. No need for it to be stored elsewhere in memory. --- view.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view.h') diff --git a/view.h b/view.h index 79275c8..b159267 100644 --- a/view.h +++ b/view.h @@ -87,7 +87,7 @@ typedef struct View { * @defgroup view_life * @{ */ -View *view_new(Text*); +bool view_init(View*, Text*); void view_free(View*); void view_reload(View*, Text*); /** @@ -96,7 +96,7 @@ void view_reload(View*, Text*); * @{ */ /** Get the currently displayed text range. */ -#define VIEW_VIEWPORT_GET(v) (Filerange){ .start = v->start, .end = v->end } +#define VIEW_VIEWPORT_GET(v) (Filerange){ .start = v.start, .end = v.end } /** * Get window coordinate of text position. * @param pos The position to query. -- cgit v1.2.3