diff options
author | eik <eik@FreeBSD.org> | 2004-11-19 21:44:37 +0800 |
---|---|---|
committer | eik <eik@FreeBSD.org> | 2004-11-19 21:44:37 +0800 |
commit | a29610b2becc324d37650fc70af010751d83c612 (patch) | |
tree | 8b7a2b987254d2ad68d8914f0d2fec1e15f42873 | |
parent | e6aad85cad582208cb76970407bb7c385896ab60 (diff) | |
download | freebsd-ports-gnome-a29610b2becc324d37650fc70af010751d83c612.tar.gz freebsd-ports-gnome-a29610b2becc324d37650fc70af010751d83c612.tar.zst freebsd-ports-gnome-a29610b2becc324d37650fc70af010751d83c612.zip |
Fix `read -e' handling when PS1 is longer than the terminal width
<http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139306>
Obtained from: Tim Waugh <twaugh@redhat.com>
-rw-r--r-- | shells/bash/Makefile | 2 | ||||
-rw-r--r-- | shells/bash/files/patch-lib::readline::display.c | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index 20cb20152e65..276c203e2937 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -7,7 +7,7 @@ PORTNAME= bash PORTVERSION= 3.0.${PATCHLEVEL} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU:S/$/:bash/} \ http://cnswww.cns.cwru.edu/~chet/%SUBDIR%/:faq \ diff --git a/shells/bash/files/patch-lib::readline::display.c b/shells/bash/files/patch-lib::readline::display.c new file mode 100644 index 000000000000..269f52ee03d7 --- /dev/null +++ b/shells/bash/files/patch-lib::readline::display.c @@ -0,0 +1,24 @@ +# +# Fix handling of `read -e' while PS1 is set longer than the screen width +# +# http://lists.gnu.org/archive/html/bug-bash/2004-11/msg00220.html +# http://lists.gnu.org/archive/html/bug-bash/2004-11/msg00266.html +# +--- lib/readline/display.c.orig 2004-11-18 16:24:46.000000000 +0000 ++++ lib/readline/display.c 2004-11-18 17:12:32.904903404 +0000 +@@ -572,11 +572,10 @@ + + /* inv_lbreaks[i] is where line i starts in the buffer. */ + inv_lbreaks[newlines = 0] = 0; +-#if 0 +- lpos = out - wrap_offset; +-#else +- lpos = prompt_physical_chars + modmark; +-#endif ++ if (local_prompt) ++ lpos = prompt_physical_chars + modmark; ++ else ++ lpos = 0; + + #if defined (HANDLE_MULTIBYTE) + memset (_rl_wrapped_line, 0, vis_lbsize); |