summaryrefslogtreecommitdiff
path: root/display.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2023-11-17 16:06:49 -0500
committerChet Ramey <chet.ramey@case.edu>2023-11-17 16:06:49 -0500
commitbfe9c573a9e376323929c80b2b71c59727fab0cc (patch)
tree3262d2fa62d29750038fa30d10049f36aec95638 /display.c
parent93a6afa50f953246f7c0f93b219a1e4010ba704b (diff)
Readline-8.2 patch 7: display newline if readline is called without a prompt string and return is typed on a single empty line
Diffstat (limited to 'display.c')
-rw-r--r--display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/display.c b/display.c
index ad573f9..803d4ce 100644
--- a/display.c
+++ b/display.c
@@ -3338,9 +3338,9 @@ _rl_update_final (void)
puts_face (&last_line[_rl_screenwidth - 1 + woff],
&last_face[_rl_screenwidth - 1 + woff], 1);
}
- _rl_vis_botlin = 0;
- if (botline_length > 0 || _rl_last_c_pos > 0)
+ if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0)
rl_crlf ();
+ _rl_vis_botlin = 0;
fflush (rl_outstream);
rl_display_fixed++;
}