1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

ccmake: Don't overwrite the last character of the title

This commit is contained in:
Sylvain Joubert
2019-10-25 13:13:14 +02:00
parent 1d0e557aed
commit 66d969fcc4
2 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ void cmCursesLongMessageForm::UpdateStatusBar()
size = cmCursesMainForm::MAX_WIDTH - 1;
}
strncpy(bar, this->Title.c_str(), size);
for (size_t i = size - 1; i < cmCursesMainForm::MAX_WIDTH; i++) {
for (size_t i = size; i < cmCursesMainForm::MAX_WIDTH; i++) {
bar[i] = ' ';
}
int width;

View File

@@ -533,9 +533,9 @@ int cmCursesMainForm::Configure(int noconfigure)
int xx;
int yy;
getmaxyx(stdscr, yy, xx);
const char* title = "Configure produced the following output.";
const char* title = "Configure produced the following output";
if (cmSystemTools::GetErrorOccuredFlag()) {
title = "Configure failed with the following output.";
title = "Configure failed with the following output";
}
cmCursesLongMessageForm* msgs =
new cmCursesLongMessageForm(this->Outputs, title);
@@ -590,9 +590,9 @@ int cmCursesMainForm::Generate()
int xx;
int yy;
getmaxyx(stdscr, yy, xx);
const char* title = "Generate produced the following output.";
const char* title = "Generate produced the following output";
if (cmSystemTools::GetErrorOccuredFlag()) {
title = "Generate failed with the following output.";
title = "Generate failed with the following output";
}
cmCursesLongMessageForm* msgs =
new cmCursesLongMessageForm(this->Outputs, title);
@@ -850,7 +850,7 @@ void cmCursesMainForm::HandleInput()
}
cmCursesLongMessageForm* msgs =
new cmCursesLongMessageForm(this->HelpMessage, "Help.");
new cmCursesLongMessageForm(this->HelpMessage, "Help");
CurrentForm = msgs;
msgs->Render(1, 1, x, y);
msgs->HandleInput();
@@ -862,7 +862,7 @@ void cmCursesMainForm::HandleInput()
else if (key == 'l') {
getmaxyx(stdscr, y, x);
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(
this->Outputs, "CMake produced the following output.");
this->Outputs, "CMake produced the following output");
CurrentForm = msgs;
msgs->Render(1, 1, x, y);
msgs->HandleInput();