https://bugs.llvm.org/show_bug.cgi?id=40200

            Bug ID: 40200
           Summary: color prompt causes wrong indentation of cmds (with
                    `settings set prompt "\033[31m(lldb)\033[0m "`)
           Product: lldb
           Version: unspecified
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev@lists.llvm.org
          Reporter: thelastmamm...@gmail.com
                CC: llvm-b...@lists.llvm.org

~/.lldbinit:
```
settings set prompt "\033[31m(lldb)\033[0m "
```

this "almost" works, it it shows a colored prompt (red), however, it causes
wrong indentation between prompt and typed commands.

```
(lldb)          platform shell pwd
/Users/timothee/git_clone/llvm/tools/lldb
(lldb)
```

I suspect that the bug is likely caused by line editor naively counting the
number of chars in given prompt, instead of number of printable chars.

Could we allow (as workaround) user to specify actual width (and user is
responsible for specifying the correct amount of printable characters)

Where would that be in code?

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to