diff --git a/src/winio.c b/src/winio.c
index 85bc86e9f16b850b985d223f67017081ab2ae905..f72a8e68b77b6fecac25d2787dab11ff2ad52ee0 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3184,6 +3184,9 @@ void do_cursorpos(bool force)
 
     assert(openfile->fileage != NULL && openfile->current != NULL);
 
+    /* Hide the cursor while we are calculating. */
+    curs_set(0);
+
     /* Determine the size of the file up to the cursor. */
     saved_byte = openfile->current->data[openfile->current_x];
     openfile->current->data[openfile->current_x] = '\0';