Skip to content

Cardinal focus: wrong documentation and possible room for improvement #187

@xalexalex

Description

@xalexalex

Hey,

berry/berryc.1

Line 74 in b563041

\fBcardinal_focus\fR \fB1, 2, 3, 4\fR
says that the arguments to cardinal focus are "1,2,3,4", but

berry/types.h

Lines 77 to 82 in b563041

enum direction {
EAST,
NORTH,
WEST,
SOUTH
};
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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions