summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2018-02-06 16:22:34 -0500
committerChet Ramey <chet.ramey@case.edu>2018-02-06 16:22:34 -0500
commitb0776d8c49ab4310fa056ce1033985996c5b9807 (patch)
treec3d91cfafa66c802126e560fcb6212bd31256b0d /lib
parenteb78197af36bb0fb95493ebf8fce104be6832ec9 (diff)
downloadbash-b0776d8c49ab4310fa056ce1033985996c5b9807.tar.gz
Bash-4.4 patch 19
Diffstat (limited to 'lib')
-rw-r--r--lib/readline/display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/readline/display.c b/lib/readline/display.c
index 41fb0531..2d2e768a 100644
--- a/lib/readline/display.c
+++ b/lib/readline/display.c
@@ -771,7 +771,9 @@ rl_redisplay ()
appear in the first and last lines of the prompt */
wadjust = (newlines == 0)
? prompt_invis_chars_first_line
- : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line);
+ : ((newlines == prompt_lines_estimate)
+ ? (wrap_offset - prompt_invis_chars_first_line)
+ : 0);
/* fix from Darin Johnson <darin@acuson.com> for prompt string with
invisible characters that is longer than the screen width. The