public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/28887] New: colored prompt length not calculated correctly
@ 2022-02-13 16:58 seanga2 at gmail dot com
  2022-02-13 17:01 ` [Bug tui/28887] " seanga2 at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: seanga2 at gmail dot com @ 2022-02-13 16:58 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28887

            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 can 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-05-26 16:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 16:58 [Bug tui/28887] New: colored prompt length not calculated correctly seanga2 at gmail dot com
2022-02-13 17:01 ` [Bug tui/28887] " seanga2 at gmail dot com
2022-02-13 17:47 ` schwab@linux-m68k.org
2022-02-13 17:50 ` seanga2 at gmail dot com
2022-02-17 16:17 ` ssbssa at sourceware dot org
2022-02-17 16:32 ` schwab@linux-m68k.org
2022-02-17 16:35 ` ssbssa at sourceware dot org
2022-02-17 17:15 ` schwab@linux-m68k.org
2023-05-26 16:12 ` vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).