mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 00:58:52 +00:00
Merge pull request #2098
fdccf7e6
Add readline improvements (Jethro Grassie)
This commit is contained in:
commit
40dc53c6e2
@ -315,7 +315,11 @@ namespace epee
|
|||||||
if (!m_prompt.empty())
|
if (!m_prompt.empty())
|
||||||
{
|
{
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
m_stdin_reader.get_readline_buffer().set_prompt(m_prompt);
|
std::string color_prompt = "\001\033[1;33m\002" + m_prompt;
|
||||||
|
if (' ' != m_prompt.back())
|
||||||
|
color_prompt += " ";
|
||||||
|
color_prompt += "\001\033[0m\002";
|
||||||
|
m_stdin_reader.get_readline_buffer().set_prompt(color_prompt);
|
||||||
#else
|
#else
|
||||||
epee::set_console_color(epee::console_color_yellow, true);
|
epee::set_console_color(epee::console_color_yellow, true);
|
||||||
std::cout << m_prompt;
|
std::cout << m_prompt;
|
||||||
|
@ -168,8 +168,11 @@ static int handle_enter(int x, int y)
|
|||||||
}
|
}
|
||||||
free(line);
|
free(line);
|
||||||
|
|
||||||
rl_set_prompt(last_prompt.c_str());
|
if(last_line != "exit")
|
||||||
rl_redisplay();
|
{
|
||||||
|
rl_set_prompt(last_prompt.c_str());
|
||||||
|
rl_redisplay();
|
||||||
|
}
|
||||||
|
|
||||||
rl_done = 1;
|
rl_done = 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user