for (r = 0; r < h; ++r) {
for (c = 0; c < w; ++c) {
int i = r*w + c, cell = r*ch*gw + c*cw;
- board[cell] = state->shared->clues[i]["+BW"];
+ board[cell] = "+BW"[(unsigned char)state->shared->clues[i]];
if (c < w - 1 && (state->lines[i] & R || state->lines[i+1] & L))
memset(board + cell + 1, '-', cw - 1);
if (r < h - 1 && (state->lines[i] & D || state->lines[i+w] & U))
if (!ui->cursor_active) {
ui->cursor_active = TRUE;
} else if (control | shift) {
+ char *move;
if (ui->ndragcoords > 0) return NULL;
ui->ndragcoords = -1;
- return mark_in_direction(state, ui->curx, ui->cury,
+ move = mark_in_direction(state, ui->curx, ui->cury,
KEY_DIRECTION(button), control, tmpbuf);
+ if (control && !shift && *move)
+ move_cursor(button, &ui->curx, &ui->cury, w, h, FALSE);
+ return move;
} else {
move_cursor(button, &ui->curx, &ui->cury, w, h, FALSE);
if (ui->ndragcoords >= 0)
}
}
+ if (button == 27 || button == '\b') {
+ ui->ndragcoords = -1;
+ return "";
+ }
+
if (release) {
if (ui->ndragcoords > 0) {
/* End of a drag: process the cached line data. */