Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 2e4c79b8 authored by echicken's avatar echicken 🐔

Added 'autoDelete' setting. Probably needs some more work.

If true, and if this is our first input, and if the users types
something that would otherwise have been appended to the default
text, then the default text is deleted first.
parent 9f1145e6
......@@ -238,6 +238,8 @@ var Typeahead = function (options) {
attr: console.attributes,
focus: true,
maxResults: 0,
autoDelete: false,
gotInput: false,
};
var display = {
......@@ -460,6 +462,10 @@ var Typeahead = function (options) {
}
break;
default:
if (properties.autoDelete && !properties.gotInput) {
properties.text = '';
properties.position = 0;
}
if (properties.text.length === properties.len) break;
key = strip_ctrl(key);
if (properties.position !== properties.text.length) {
......@@ -476,6 +482,7 @@ var Typeahead = function (options) {
change = true;
break;
}
properties.gotInput = true;
if (change) {
display.inputFrame.clear();
display.inputFrame.putmsg(properties.text);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment