commit afc56baee655301bdb7aec34527c9a0295e0d1dc parent 8f07b24474f7327ec59c79c15253e0fe46a4ae97 Author: lostd <lostd@2f30.org> Date: Fri, 21 Nov 2014 18:29:53 +0200 This makes more sense now, avoid mod operation Diffstat:
M | nausea.c | | | 8 | ++------ |
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/nausea.c b/nausea.c @@ -567,15 +567,11 @@ main(int argc, char *argv[]) break; case 'n': case KEY_RIGHT: - vidx = vidx == (LEN(visuals) - 1) - ? 0 - : vidx + 1 % LEN(visuals); + vidx = vidx == (LEN(visuals) - 1) ? 0 : vidx + 1; break; case 'N': case KEY_LEFT: - vidx = vidx == 0 - ? LEN(visuals) - 1 - : vidx - 1 % LEN(visuals); + vidx = vidx == 0 ? LEN(visuals) - 1 : vidx - 1; break; }