diff --git a/src/text.c b/src/text.c
index 72fbe8e82f1aa086dbd243715134d11560210e88..e80c09c953bff443af54c904cfac6bdf8c9f5bc8 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1070,6 +1070,7 @@ void do_enter(void)
 #endif
 
 	refresh_needed = TRUE;
+	focusing = FALSE;
 }
 
 #ifndef NANO_TINY