Commit 0f32e4d
committed
[lldb] Fix that CompletionRequestGetRawLineUntilCursor returns the wrong result
By using m_cursor_index and not m_raw_cursor_pos in this function
we return the characters until the argument index (not the character index).
This means that for "foo" (cursor at the end of the string)
this returns "" instead of "foo" (as the argument index is 0 for the
first argument and not 4 which is the character index at the end).
This lead to a crash in the REPL completion where it would cause that
we would complete the string "ABC" to " " as we think the line
is actually empty and we want to provide the indentation string.
Note that the function has already been deleted upstream so this bug
doesn't exist there.1 parent bd31559 commit 0f32e4d
File tree
2 files changed
+2
-1
lines changed- lldb
- include/lldb/Utility
- unittests/Utility
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments