Skip to content

Commit

Permalink
Add a new key - W
Browse files Browse the repository at this point in the history
  • Loading branch information
coditva committed Nov 24, 2017
1 parent f433c79 commit 66249cc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,23 @@ point_t * exec_motion(const map_t *map, const command_t *command)
if (tile.value == ' ') flag2 = 1;
}
break;

case 'W':
tile = map_get_tile(temp);
if (tile.type != TILE_TEXT) break;

increment_cursor(map, &temp);
flag1 = 0;
while (1) {
tile = map_get_tile(temp);
if (flag1 && tile.value != ' ') {
break;
} else if (tile.value == ' ') {
flag1 = 1;
}
increment_cursor(map, &temp);
}
break;
}

if (temp.y == map -> cursor.y && !map_is_free(temp)) {
Expand Down

0 comments on commit 66249cc

Please sign in to comment.