From e5e61842c5bf610da1b4ceeb52e613dd911040b6 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 5 Feb 2015 15:05:56 +0100 Subject: [PATCH] window: don't add encrypted prompts to input history --- NEWS | 1 + src/window.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 442e252d..19fc4f4b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ncmpcpp-0.6.3 (????-??-??) * Fix floating point exception when adding a specific number of random items. +* Passwords are no longer added to the input history. ncmpcpp-0.6.2 (2014-12-13) diff --git a/src/window.cpp b/src/window.cpp index 961fcd59..edf83b63 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -820,7 +820,7 @@ std::string Window::getString(const std::string &base, size_t width, bool encryp curs_set(0); if (input != nullptr) { - if (input[0] != 0) + if (!encrypted && input[0] != 0) add_history(input); result = input; free(input);