added toggle always show words history to the command line

This commit is contained in:
Jack 2020-11-11 13:48:05 +00:00
parent d8ab40b35f
commit c68cc0bec5
2 changed files with 16 additions and 0 deletions

View file

@ -210,6 +210,13 @@ let commands = {
toggleBlindMode();
},
},
{
id: "toggleAlwaysShowWordsHistory",
display: "Toggle always show words history",
exec: () => {
toggleAlwaysShowWordsHistory();
},
},
{
id: "toggleIndicateTypos",
display: "Toggle indicate typos",

View file

@ -552,6 +552,15 @@ function setAlwaysShowWordsHistory(val, nosave) {
if (!nosave) saveConfigToCookie();
}
function toggleAlwaysShowWordsHistory() {
let val = !config.alwaysShowWordsHistory;
if (val == undefined) {
val = false;
}
config.alwaysShowWordsHistory = val;
saveConfigToCookie();
}
//single list command line
function setSingleListCommandLine(option, nosave) {
if (!option) option = "manual";