diff --git a/src/terminal.go b/src/terminal.go
index a5ac33ccb78db200accbc209f318ce4f54b9cce7..c5c9e9187166ca9dd037a9df7832918c38db4903 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -388,7 +388,7 @@ func (t *Terminal) printHeader() {
 			line -= 1
 		}
 		if line >= max {
-			break
+			continue
 		}
 		trimmed, colors, newState := extractColor(&lineStr, state)
 		state = newState
diff --git a/test/test_go.rb b/test/test_go.rb
index 7effb5fbd340bfcaed850e065292df8b44d00386..dd113d1f7e1966116699cead797e2f86e7b1eb8b 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -680,7 +680,10 @@ class TestGoFZF < TestBase
 
   def test_header_lines_overflow
     tmux.send_keys "seq 100 | #{fzf '--header-lines=200'}", :Enter
-    tmux.until { |lines| lines[-2].include?('0/0') }
+    tmux.until do |lines|
+      lines[-2].include?('0/0') &&
+      lines[-3].include?('  1')
+    end
     tmux.send_keys :Enter
     assert_equal '', readonce.chomp
   end