summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2019-10-30 13:10:33 (GMT)
committerSylvain Joubert <joubert.sy@gmail.com>2019-11-04 19:06:51 (GMT)
commitd5d5ba3f7fe7dd5a52e6671387128cb9a901ec1e (patch)
tree20212576fe413a0a22e67f6fb02c70b06d0dcd94 /Source
parent005aba29a1b5774b778bb65f4751a572d628589f (diff)
downloadCMake-d5d5ba3f7fe7dd5a52e6671387128cb9a901ec1e.zip
CMake-d5d5ba3f7fe7dd5a52e6671387128cb9a901ec1e.tar.gz
CMake-d5d5ba3f7fe7dd5a52e6671387128cb9a901ec1e.tar.bz2
ccmake: Identify the current cache entry
Diffstat (limited to 'Source')
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 4385ddc..ffc9528 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -447,6 +447,15 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
bar[width] = '\0';
+ // Highlight the current label
+ // Fields are grouped by 3, the first one being the label
+ // so start at 0 and move up by 3 avoiding the last null entry
+ using size_type = decltype(this->Fields)::size_type;
+ for (size_type index = 0; index < this->Fields.size() - 1; index += 3) {
+ bool currentLabel = index == static_cast<size_type>(findex - 2);
+ set_field_fore(this->Fields[index], currentLabel ? A_STANDOUT : A_NORMAL);
+ }
+
// Display CMake version info on the next line
// We want to display this on the right
char version[cmCursesMainForm::MAX_WIDTH];