Skip to content

Commit cc1f091

Browse files
authored
Merge pull request #9661 from swiftlang/cherrypick-swift/release/6.1-4b5a8d683589
[🍒 swift/release/6.1] [lldb] Make sure completions don't end with newlines (llvm#117054)
2 parents 6eae094 + 7cfaaaa commit cc1f091

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/include/lldb/Utility/CompletionRequest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class CompletionResult {
5252
public:
5353
Completion(llvm::StringRef completion, llvm::StringRef description,
5454
CompletionMode mode)
55-
: m_completion(completion.str()), m_descripton(description.str()),
56-
m_mode(mode) {}
55+
: m_completion(completion.rtrim().str()),
56+
m_descripton(description.rtrim().str()), m_mode(mode) {}
5757
const std::string &GetCompletion() const { return m_completion; }
5858
const std::string &GetDescription() const { return m_descripton; }
5959
CompletionMode GetMode() const { return m_mode; }

0 commit comments

Comments
 (0)