================
@@ -287,6 +287,79 @@ inline size_t ColumnWidth(llvm::StringRef str) {
   return llvm::sys::locale::columnWidth(stripped);
 }
 
+// This function converts an index into "visible" text (text with ANSI codes
+// removed) into an index into the actual data of the text (which includes ANSI
+// codes). That actual index should be used when printing the actual data.
----------------
JDevlieghere wrote:

This should at least mention how this treats UTF-8, which is another common 
source of divergence between the visible and actual length. Almost everywhere 
we support escape codes, we also support unicode. 

https://github.com/llvm/llvm-project/pull/178653
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to