Skip to content
Snippets Groups Projects
Commit b718c9f2 authored by mcmlxxix's avatar mcmlxxix
Browse files

do not return false on backspace

parent d0a0a4ed
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,7 @@ function InputLine(frame,text) { ...@@ -94,7 +94,7 @@ function InputLine(frame,text) {
/* private functions */ /* private functions */
function bufferKey(key) { function bufferKey(key) {
if(properties.buffer.length >= settings.max_buffer) if(properties.buffer.length >= settings.max_buffer)
return false; return undefined;
properties.buffer+=key; properties.buffer+=key;
if(properties.buffer.length>properties.frame.width) if(properties.buffer.length>properties.frame.width)
printBuffer(); printBuffer();
...@@ -104,7 +104,7 @@ function InputLine(frame,text) { ...@@ -104,7 +104,7 @@ function InputLine(frame,text) {
} }
function backspace() { function backspace() {
if(properties.buffer.length == 0) if(properties.buffer.length == 0)
return false; return undefined;
properties.buffer=properties.buffer.substr(0,properties.buffer.length-1); properties.buffer=properties.buffer.substr(0,properties.buffer.length-1);
if(properties.buffer.length+1>=properties.frame.width) if(properties.buffer.length+1>=properties.frame.width)
printBuffer(); printBuffer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment