Skip to content

Commit

Permalink
Update draw collab docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
newsch committed May 29, 2019
1 parent 77832b0 commit a2bfe39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ void redraw_canvas_win() {
}

/* Draw all visible collaborator cursors on the canvas.
*
* Collaborator cursor colors are from `cursors_colors` and set by uid.
*/
void draw_collab_cursors(collab_list_t *collab_list) {
collab_t *c = NULL;
Expand All @@ -374,6 +376,7 @@ void draw_collab_cursors(collab_list_t *collab_list) {
const int max_y = min(view_max_y, view->canvas->num_rows - view->y);
for (int i = 0; i < collab_list->len; i++) {
c = collab_list->list[i];
// only draw cursors that exist and are visible on the screen
if (c != NULL && (c->x >= min_x && c->y <= max_x) &&
(c->y >= min_y && c->y <= max_y)) {
logd("Drawing collab %i\n", c->uid);
Expand Down

0 comments on commit a2bfe39

Please sign in to comment.