mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
ccmake: Fix mangled configuration log with PDCurses on Windows
This fix seems to work on both Windows and Ubuntu (WSL). Issue: #18053
This commit is contained in:

committed by
Brad King

parent
9b051f557e
commit
a78d10220c
@@ -43,7 +43,8 @@ void cmCursesLongMessageForm::UpdateContent(std::string const& output,
|
|||||||
if (!output.empty() && this->Messages.size() < MAX_CONTENT_SIZE) {
|
if (!output.empty() && this->Messages.size() < MAX_CONTENT_SIZE) {
|
||||||
this->Messages.push_back('\n');
|
this->Messages.push_back('\n');
|
||||||
this->Messages.append(output);
|
this->Messages.append(output);
|
||||||
form_driver(this->Form, REQ_NEW_LINE);
|
form_driver(this->Form, REQ_NEXT_LINE);
|
||||||
|
form_driver(this->Form, REQ_BEG_LINE);
|
||||||
this->DrawMessage(output.c_str());
|
this->DrawMessage(output.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +153,8 @@ void cmCursesLongMessageForm::DrawMessage(const char* msg) const
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while (msg[i] != '\0' && i < MAX_CONTENT_SIZE) {
|
while (msg[i] != '\0' && i < MAX_CONTENT_SIZE) {
|
||||||
if (msg[i] == '\n' && msg[i + 1] != '\0') {
|
if (msg[i] == '\n' && msg[i + 1] != '\0') {
|
||||||
form_driver(this->Form, REQ_NEW_LINE);
|
form_driver(this->Form, REQ_NEXT_LINE);
|
||||||
|
form_driver(this->Form, REQ_BEG_LINE);
|
||||||
} else {
|
} else {
|
||||||
form_driver(this->Form, msg[i]);
|
form_driver(this->Form, msg[i]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user