File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,8 @@ void redraw_canvas_win() {
365
365
}
366
366
367
367
/* Draw all visible collaborator cursors on the canvas.
368
+ *
369
+ * Collaborator cursor colors are from `cursors_colors` and set by uid.
368
370
*/
369
371
void draw_collab_cursors (collab_list_t * collab_list ) {
370
372
collab_t * c = NULL ;
@@ -374,6 +376,7 @@ void draw_collab_cursors(collab_list_t *collab_list) {
374
376
const int max_y = min (view_max_y , view -> canvas -> num_rows - view -> y );
375
377
for (int i = 0 ; i < collab_list -> len ; i ++ ) {
376
378
c = collab_list -> list [i ];
379
+ // only draw cursors that exist and are visible on the screen
377
380
if (c != NULL && (c -> x >= min_x && c -> y <= max_x ) &&
378
381
(c -> y >= min_y && c -> y <= max_y )) {
379
382
logd ("Drawing collab %i\n" , c -> uid );
You can’t perform that action at this time.
0 commit comments