From chet@nike.ins.cwru.edu Wed May 20 09:16:58 1998 Received: from nike.ins.cwru.edu (chet@nike.INS.CWRU.Edu [129.22.8.219]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA23127 for ; Wed, 20 May 1998 09:16:56 -0700 (PDT) (envelope-from chet@nike.ins.cwru.edu) Received: (chet@localhost) by nike.ins.cwru.edu (8.8.7/CWRU-2.5-bsdi) id MAA26059; Wed, 20 May 1998 12:16:52 -0400 (EDT) (from chet) Message-Id: <199805201616.MAA26059@nike.ins.cwru.edu> Date: Wed, 20 May 1998 12:16:52 -0400 (EDT) From: chet@po.cwru.edu Reply-To: chet@po.cwru.edu To: FreeBSD-gnats-submit@freebsd.org Subject: Patch for freebsd-current/src/contrib/libreadline/display.c X-Send-Pr-Version: 3.2 >Number: 6701 >Category: gnu >Synopsis: patch for GNU readline library, version 2.2 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 20 09:20:01 PDT 1998 >Closed-Date: Sun May 24 06:00:35 PDT 1998 >Last-Modified: Sun May 24 06:02:19 PDT 1998 >Originator: Chet Ramey >Release: FreeBSD 2.2.5-RELEASE i386 >Organization: Case Western Reserve University >Environment: I don't run FreeBSD-current, but this patch is against current-src/src/contrib/libreadline/display.c (built in current-src/src/gnu/lib/libreadline). >Description: Problem with readline line wrap when the prompt is longer than the screen width and contains invisible characters. >How-To-Repeat: >Fix: Here's the patch: *** ../readline-2.2/display.c Mon Aug 4 15:54:23 1997 --- display.c Fri Apr 24 14:23:35 1998 *************** *** 424,428 **** --- 424,435 ---- while (lpos >= screenwidth) { + #if 0 temp = ((newlines + 1) * screenwidth) - ((newlines == 0) ? wrap_offset : 0); + #else + /* XXX - possible fix from Darin Johnson for prompt + string with invisible characters that is longer than the screen + width. */ + temp = ((newlines + 1) * screenwidth) + ((newlines == 0) ? wrap_offset : 0); + #endif inv_lbreaks[++newlines] = temp; lpos -= screenwidth; >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: phk State-Changed-When: Sat May 23 00:43:36 PDT 1998 State-Changed-Why: Please submit this to the GNU readline maintainers. State-Changed-From-To: closed->suspended State-Changed-By: phk State-Changed-When: Sat May 23 11:14:42 PDT 1998 State-Changed-Why: Awaiting committer. Chet, next time put this magic string in the text please: "Hi! I'm the GNU readline maintainer and ..." :-) State-Changed-From-To: suspended->closed State-Changed-By: des State-Changed-When: Sun May 24 06:00:35 PDT 1998 State-Changed-Why: Unless I missed something very subtle, the patch is bogus. Please resubmit the PR with a patch that actually changes something. >Unformatted: