berry icon indicating copy to clipboard operation
berry copied to clipboard

Cardinal focus: wrong documentation and possible room for improvement

Open xalexalex opened this issue 3 years ago • 1 comments

Hey, https://github.com/JLErvin/berry/blob/b563041b394376328019a8616fd53b58b99f39e2/berryc.1#L74 says that the arguments to cardinal focus are "1,2,3,4", but https://github.com/JLErvin/berry/blob/b563041b394376328019a8616fd53b58b99f39e2/types.h#L77-L82 implies that the arguments should be "0,1,2,3" for "E,N,W,S" respectively.

I could have filed a PR to simply change 1,2,3,4 to 0,1,2,3 in berryc.1. However, I feel the documentation as it stands is not clear: how am I supposed to map 1,2,3,4 to E,N,W,S?

Thus I'd like to discuss. At least I think we should mirror hjkl and thus make the enum E,S,N,W, but ideally the user should not deal with the numbers at all and he could use instead berryc cardinal_focus north or N or up or something more meaningful.

What do you think?

xalexalex avatar Jun 25 '22 09:06 xalexalex

Bump. I just encountered this issue. The website says simple 1/2/3/4 without elaboration. 0 for east, 1 for north, 2 for west, and 3 for south.

Echinoidea avatar Jan 29 '25 20:01 Echinoidea