mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 11:15:27 -07:00
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.)
This commit is contained in:
1 parent
3afefb0ac9
commit
d45b9edcd8
1 file changed
+1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user