mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-08 00:30:48 +00:00
ccmake: Fix backspace key in '/' searches on macOS
Accept `getch()` return value 127 as equivalent to `KEY_BACKSPACE` in searches as we already do in string widget values. Fixes: #27936
This commit is contained in:
@@ -744,7 +744,8 @@ void cmCursesMainForm::HandleInput()
|
|||||||
static_cast<std::string::size_type>(x - 10)) {
|
static_cast<std::string::size_type>(x - 10)) {
|
||||||
this->SearchString += static_cast<char>(key);
|
this->SearchString += static_cast<char>(key);
|
||||||
}
|
}
|
||||||
} else if (key == ctrl('h') || key == KEY_BACKSPACE || key == KEY_DC) {
|
} else if (key == ctrl('h') || key == 127 || key == KEY_BACKSPACE ||
|
||||||
|
key == KEY_DC) {
|
||||||
if (!this->SearchString.empty()) {
|
if (!this->SearchString.empty()) {
|
||||||
this->SearchString.pop_back();
|
this->SearchString.pop_back();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user