diff --git a/ChangeLog b/ChangeLog
index 231cbe4bbd8a62c46e16ac395dba2317389dfd49..bc01ede1f76d488d0e071ddd820e56a7e32e2339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
 	that was meant to do this.  This fixes Savannah bug #47188.
 	* src/search.c (findnextstr): Clean up and rename a variable.
 	* src/search.c (findnextstr): Poll the keyboard once per second.
+	* src/winio.c (reset_cursor): Remove a pointless condition, and make
+	use of an existing intermediary variable.
 
 2016-03-22  Thomas Rosenau  <thomasr@fantasymail.de>
 	* configure.ac, src/*.c: Check for the existence of the REG_ENHANCED
diff --git a/src/winio.c b/src/winio.c
index e8699445812c30d00dda467f933f8ef19b946e45..c18ac5373661994d94d0b762d0ea379326e7f42e 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2274,15 +2274,7 @@ void onekey(const char *keystroke, const char *desc, size_t len)
  * in the edit window at (current_y, current_x). */
 void reset_cursor(void)
 {
-    size_t xpt;
-    /* If we haven't opened any files yet, put the cursor in the top
-     * left corner of the edit window and get out. */
-    if (openfile == NULL) {
-	wmove(edit, 0, 0);
-	return;
-    }
-
-    xpt = xplustabs();
+    size_t xpt = xplustabs();
 
 #ifndef NANO_TINY
     if (ISSET(SOFTWRAP)) {
@@ -2292,7 +2284,7 @@ void reset_cursor(void)
 	for (tmp = openfile->edittop; tmp && tmp != openfile->current; tmp = tmp->next)
 	    openfile->current_y += (strlenpt(tmp->data) / COLS) + 1;
 
-	openfile->current_y += xplustabs() / COLS;
+	openfile->current_y += xpt / COLS;
 	if (openfile->current_y < editwinrows)
 	    wmove(edit, openfile->current_y, xpt % COLS);
     } else