Add support for > and >> prompts with new readline
This commit is contained in:
@@ -117,6 +117,11 @@ void ReadlineDevice::set_print_callback(print_callback cb) {
|
||||
print_cb_ = cb;
|
||||
}
|
||||
|
||||
void ReadlineDevice::set_prompt(const CodepointString &prompt) {
|
||||
desired_prompt_ = prompt;
|
||||
echo_command();
|
||||
}
|
||||
|
||||
void ReadlineDevice::erase_command() {
|
||||
int ccsize = current_prompt_.size() + current_command_.size();
|
||||
if (ccsize > 0) {
|
||||
@@ -168,6 +173,7 @@ CodepointString ReadlineDevice::putcode(char32_t c) {
|
||||
desired_command_.clear();
|
||||
current_prompt_.clear();
|
||||
current_command_.clear();
|
||||
echo_command();
|
||||
return result;
|
||||
} else if ((c == '\b') || (c == 127)) {
|
||||
int len = desired_command_.size();
|
||||
|
||||
Reference in New Issue
Block a user