aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-06 08:44:50 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-08-28 19:01:48 +0000
commit1a367d6a22efc2e596c29d8c3eb95102775f8b24 (patch)
tree782a9c669f1be9b112969a59442147b5c9615c4a /contrib/epee/src
parentMerge pull request #5707 (diff)
downloadmonero-1a367d6a22efc2e596c29d8c3eb95102775f8b24.tar.xz
simplewallet: lock console on inactivity
Diffstat (limited to 'contrib/epee/src')
-rw-r--r--contrib/epee/src/readline_buffer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/epee/src/readline_buffer.cpp b/contrib/epee/src/readline_buffer.cpp
index 39369c43f..05322b693 100644
--- a/contrib/epee/src/readline_buffer.cpp
+++ b/contrib/epee/src/readline_buffer.cpp
@@ -71,6 +71,11 @@ rdln::linestatus rdln::readline_buffer::get_line(std::string& line) const
{
boost::lock_guard<boost::mutex> lock(sync_mutex);
line_stat = rdln::partial;
+ if (!m_cout_buf)
+ {
+ line = "";
+ return rdln::full;
+ }
rl_callback_read_char();
if (line_stat == rdln::full)
{
@@ -224,3 +229,8 @@ static void remove_line_handler()
rl_callback_handler_remove();
}
+void rdln::clear_screen()
+{
+ rl_clear_screen(0, 0);
+}
+