Browse Source

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

Sylvain Joubert 6 years ago
parent
commit
66d969fcc4

+ 1 - 1
Source/CursesDialog/cmCursesLongMessageForm.cxx

@@ -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;

+ 6 - 6
Source/CursesDialog/cmCursesMainForm.cxx

@@ -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();