DavidSpickett wrote:

I had to try some Unicode of course. I think you have a TODO in there about 
this already but just because it was fun...
```
>>> "東".encode()
b'\xe6\x9d\xb1'
>>> "a".encode()
b'a'
```
I can get way more 'a' before I get the '...' than '東'. Same for an emoji, 
which is a more likely use case. They do display though so as long as you're 
not going to hit the column limit anyway, you would never know.

Also editing these unicode strings in LLDB is rather strange, presumably 
because of the same character counting issue (could be my terminal though).

I thought that the calculation for the end might be off:
```
(lldb) settings set statusline-format 
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
(lldb)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   << terminal ends here, there are 3 empty columns.
```
If I set it to one more I get the ...
```
(lldb) settings set statusline-format 
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
(lldb)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...<<terminal
 ends here
```
Should it go right to the last column before the '...' is added?

Maybe not because if we do that, say the end of the status line is "xyz". I add 
one more character, now my "xyz" is overwritten by "...". Which means it's 
showing me even less than before, +1 character means -3 characters.

So actually this is correct, but tell me if I understood the logic correctly.

https://github.com/llvm/llvm-project/pull/121860
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to