[hackers][vis][PATCH] Initialize enum values to the public API ones

From: Silvan Jegen <s.jegen_AT_gmail.com>
Date: Sun, 20 Dec 2015 14:08:04 +0100

---
The goal of the original patch was to get rid of an enum that was defined
twice with similar values. Since one of them seems to be the public API
we use this one to initialize the internal enum.
Adding the enum values from vis-core.h to the public API in vis.h
would unify the enums but expose the other enum values which may not
be desirable.
So for now I just initialize the internal enum using the values from
vis.h as suggested by Marc.
 
 vis-core.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vis-core.h b/vis-core.h
index 1ecc1b6..22bec33 100644
--- a/vis-core.h
+++ b/vis-core.h
_AT_@ -59,8 +59,8 @@ typedef struct { /* Motion implementation, takes a cursor postion and returns a
 	size_t (*view)(Vis*, View*);
 	size_t (*win)(Vis*, Win*, size_t pos);
 	enum {
-		LINEWISE  = 1 << 0,  /* should the covered range be extended to whole lines? */
-		CHARWISE  = 1 << 1,  /* scrolls window content until position is visible */
+		LINEWISE  = VIS_MOTIONTYPE_LINEWISE,  /* should the covered range be extended to whole lines? */
+		CHARWISE  = VIS_MOTIONTYPE_CHARWISE,  /* scrolls window content until position is visible */
 		INCLUSIVE = 1 << 2,  /* should new position be included in operator range? */
 		IDEMPOTENT = 1 << 3, /* does the returned postion remain the same if called multiple times? */
 		JUMP = 1 << 4,
-- 
2.6.4
Received on Sun Dec 20 2015 - 14:08:04 CET

This archive was generated by hypermail 2.3.0 : Sun Dec 20 2015 - 14:12:12 CET