File src/PromptRequest.cpp changed (mode: 100644) (index 03e1606..f64c351) |
29 |
29 |
#include <string> |
#include <string> |
30 |
30 |
#include <utility> |
#include <utility> |
31 |
31 |
|
|
|
32 |
|
#include <readline/history.h> |
32 |
33 |
#include <readline/readline.h> |
#include <readline/readline.h> |
33 |
34 |
|
|
34 |
35 |
#include "cursed/Input.hpp" |
#include "cursed/Input.hpp" |
|
... |
... |
PromptRequest::prompt(const std::wstring &invitation, |
137 |
138 |
|
|
138 |
139 |
if (line == nullptr) { |
if (line == nullptr) { |
139 |
140 |
cancelled = true; |
cancelled = true; |
|
141 |
|
} else if (*line != '\0') { |
|
142 |
|
add_history(line.get()); |
140 |
143 |
} |
} |
141 |
144 |
|
|
142 |
145 |
return (cancelled ? std::wstring() : cursed::toWide(line.get())); |
return (cancelled ? std::wstring() : cursed::toWide(line.get())); |