diff options
| author | hallgren <hallgren@chalmers.se> | 2011-08-22 17:03:47 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2011-08-22 17:03:47 +0000 |
| commit | d45b9edcd808d10041fec8a5d7bad4a74de24ddc (patch) | |
| tree | c34afbd0995ad4c2a344c799cb3d64dd743ffcc2 /src | |
| parent | 3afefb0ac9aaaf15eb421424856bbf21e90f4153 (diff) | |
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.)
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/javascript/minibar/minibar_input.js | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |
