diff options
author | Brad King <brad.king@kitware.com> | 2020-06-02 13:17:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-02 13:17:24 (GMT) |
commit | 961ca77a7a272fb5cde7e07671a51e9110f9ef36 (patch) | |
tree | 86a6f8090aba5c7fd613603db642ce89f2237d8c /Source/CursesDialog | |
parent | a432b1075c8808c6e4c925d3f4d4ce94c5477bab (diff) | |
parent | e1b2c0108f84ff6deaae8c4469a871caf4854a9c (diff) | |
download | CMake-961ca77a7a272fb5cde7e07671a51e9110f9ef36.zip CMake-961ca77a7a272fb5cde7e07671a51e9110f9ef36.tar.gz CMake-961ca77a7a272fb5cde7e07671a51e9110f9ef36.tar.bz2 |
Merge topic 'gitlab-ci-ninja-multi'
e1b2c0108f gitlab-ci: add a Ninja Multi-Config test job
1e8ecfccdd gitlab-ci: also build ncurses and Qt code on Linux
95721f0a82 ci: install ncurses and Qt development into the Fedora 31 image
ed2fe558b0 CursesDialog: resolve clang-tidy warnings
44f1744bed QtDialog: avoid using deprecated APIs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4832
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/cmCursesMainForm.cxx | 6 | ||||
-rw-r--r-- | Source/CursesDialog/cmCursesStringWidget.cxx | 10 |
2 files changed, 5 insertions, 11 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 14eadd9..6fc556c 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -854,11 +854,7 @@ void cmCursesMainForm::HandleInput() } // switch advanced on/off else if (key == 't') { - if (this->AdvancedMode) { - this->AdvancedMode = false; - } else { - this->AdvancedMode = true; - } + this->AdvancedMode = !this->AdvancedMode; getmaxyx(stdscr, y, x); this->RePost(); this->Render(1, 1, x, y); diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index c629478..4830d63 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -105,12 +105,10 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, if (!this->InEdit && (key != 10 && key != KEY_ENTER && key != 'i')) { return false; } - // enter edit with return and i (vim binding) - if (!this->InEdit && (key == 10 || key == KEY_ENTER || key == 'i')) { - this->OnReturn(fm, w); - } - // leave edit with return (but not i -- not a toggle) - else if (this->InEdit && (key == 10 || key == KEY_ENTER)) { + // toggle edit with return + if ((key == 10 || key == KEY_ENTER) + // enter edit with i (and not-edit mode) + || (!this->InEdit && key == 'i')) { this->OnReturn(fm, w); } else if (key == KEY_DOWN || key == ctrl('n') || key == KEY_UP || key == ctrl('p') || key == KEY_NPAGE || key == ctrl('d') || |