From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DC063858D1E; Sun, 13 Feb 2022 16:58:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DC063858D1E From: "seanga2 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug tui/28887] New: colored prompt length not calculated correctly Date: Sun, 13 Feb 2022 16:58:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tui X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: seanga2 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2022 16:58:43 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28887 Bug ID: 28887 Summary: colored prompt length not calculated correctly Product: gdb Version: unknown Status: UNCONFIRMED Severity: normal Priority: P2 Component: tui Assignee: unassigned at sourceware dot org Reporter: seanga2 at gmail dot com Target Milestone: --- When using gdb with a colored prompt such as set prompt \033[31mgdb$ \033[0m the length of the prompt will include the non-visible escape codes. This ca= n be demonstrated by entering a long command: gdb$ some long command and then pressing UP and HOME (or C-P and C-A). The cursor will be placed on the space after "long," instead of on the s in "some", as expected. Additionally, if one presses DOWN (C-N), "some long" will remain at the beginning of the command. Despite this, the cursor is "logically" at the beginning of the command, which can be seen by editing the command and inspecting the history. --=20 You are receiving this mail because: You are on the CC list for the bug.=