aboutsummaryrefslogtreecommitdiff
path: root/view.h
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-05-21 11:27:08 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-05-21 20:21:46 -0600
commit7554ecd77efc29601b7b44deca602724917ce019 (patch)
tree9e8e7d0ca7f0b173f98c224a25f6f626dcece8ac /view.h
parent7e85064ac77ea43e84d88eb910b0adb6f07d5d12 (diff)
downloadvis-7554ecd77efc29601b7b44deca602724917ce019.tar.gz
vis-7554ecd77efc29601b7b44deca602724917ce019.tar.xz
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.
Diffstat (limited to 'view.h')
-rw-r--r--view.h4
1 files changed, 2 insertions, 2 deletions
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.