fix multiline text context menu
Some checks failed
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousDelivery / linux-ubuntu (push) Failing after 4m47s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m27s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m25s
ContinuousIntegration / linux (push) Successful in 3m56s
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m14s
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m4s

This commit is contained in:
Green Sky 2024-07-16 12:47:31 +02:00
parent 53ae3f8ce5
commit 18c37f9934
No known key found for this signature in database

View File

@ -886,6 +886,7 @@ void ChatGui4::renderMessageBodyText(Message3Registry& reg, const Message3 e) {
std::string_view msgtext_sv{msgtext}; std::string_view msgtext_sv{msgtext};
size_t pos_prev {0}; size_t pos_prev {0};
size_t pos_next {msgtext_sv.find_first_of('\n')}; size_t pos_next {msgtext_sv.find_first_of('\n')};
ImGui::BeginGroup();
do { do {
const auto current_line = msgtext_sv.substr(pos_prev, pos_next - pos_prev); const auto current_line = msgtext_sv.substr(pos_prev, pos_next - pos_prev);
if (current_line.front() == '>') { if (current_line.front() == '>') {
@ -911,6 +912,7 @@ void ChatGui4::renderMessageBodyText(Message3Registry& reg, const Message3 e) {
} }
} while (pos_prev != msgtext_sv.npos); } while (pos_prev != msgtext_sv.npos);
ImGui::EndGroup();
ImGui::PopTextWrapPos(); ImGui::PopTextWrapPos();
if (ImGui::BeginPopupContextItem("##text")) { if (ImGui::BeginPopupContextItem("##text")) {