Lines Matching refs:cursor_y
180 static int cursor_y; variable
185 return (int)lines.v[cursor_y].len; in cur_max_x()
198 return lines.v[cursor_y].s[cursor_x - 1]; in char_left_of_cursor()
199 assert(cursor_y > 0); in char_left_of_cursor()
208 return lines.v[cursor_y].s[cursor_x]; in char_at_cursor()
368 move(cursor_y - offset_y, cursor_x - offset_x); in redraw()
378 cursor_y = imax(cursor_y, 0); in saturate_cursor()
379 cursor_y = imin(cursor_y, cur_max_y()); in saturate_cursor()
393 if (cursor_y < offset_y) in scroll_into_view()
394 offset_y = cursor_y; in scroll_into_view()
395 if (cursor_y > offset_y + LINES - 2) in scroll_into_view()
396 offset_y = cursor_y - (LINES - 2); in scroll_into_view()
402 return cursor_y > 0 || in can_go_left()
403 (cursor_y == 0 && cursor_x > 0); in can_go_left()
409 return cursor_y < cur_max_y() || in can_go_right()
410 (cursor_y == cur_max_y() && cursor_x < cur_max_x()); in can_go_right()
416 cursor_y--; in go_to_prev_line()
424 cursor_y++; in go_to_next_line()
432 else if (cursor_y > 0) in go_left()
441 else if (cursor_y < cur_max_y()) in go_right()
524 cursor_y++; in handle_key()
528 cursor_y--; in handle_key()
531 cursor_y -= LINES - 2; in handle_key()
534 cursor_y += LINES - 2; in handle_key()