From d45b9edcd808d10041fec8a5d7bad4a74de24ddc Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 22 Aug 2011 17:03:47 +0000 Subject: [PATCH] minibar: quick fix to allow literals to be entered. If you press Enter, the current word will be accepted, even if there are no matching completions. (You can now use names of people when constructing sentences in the Letter grammar, for example.) --- src/runtime/javascript/minibar/minibar_input.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/javascript/minibar/minibar_input.js b/src/runtime/javascript/minibar/minibar_input.js index 3269712e3..8075eb8ea 100644 --- a/src/runtime/javascript/minibar/minibar_input.js +++ b/src/runtime/javascript/minibar/minibar_input.js @@ -180,6 +180,7 @@ Input.prototype.complete_typed=function(event) { if(ws.length>1 || event.keyCode==13) { if(ws[0]!=words.filtered) filter_completions(ws[0],true); if(words.count==1) add_word(words.theword); + else if(event.keyCode==13) add_word(ws[0]) // for literals else if(elem(ws[0],words.completions)) add_word(ws[0]); else if(words.theword.length>ws[0].length) inp.value=words.theword; }