================
@@ -398,6 +397,20 @@ int Editline::GetLineIndexForLocation(CursorLocation
location, int cursor_row) {
return line;
}
+CursorPosition Editline::GetCursorPosition() {
+ if (!m_editline)
+ return {};
+
+ const LineInfoW *info = el_wline(m_editline);
+ if (!info)
+ return {};
+
+ const size_t editline_cursor_col =
+ (int)((info->cursor - info->buffer) + GetPromptWidth()) + 1;
----------------
DavidSpickett wrote:
You're going to static cast this later, so could you make the type here
unsigned to begin with?
https://github.com/llvm/llvm-project/pull/145823
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits