1
0
forked from GitHub/gf-core

minibar_input.js: internal state simplification

Get rid of list of previous states, which was only used to delete the last
word.
This commit is contained in:
hallgren
2012-04-10 16:49:51 +00:00
parent 500daf3bd4
commit 89b415ac37
2 changed files with 11 additions and 7 deletions

View File

@@ -5,6 +5,10 @@ function langpart(conc,abs) { // langpart("FoodsEng","Foods") == "Eng"
return hasPrefix(conc,abs) ? conc.substr(abs.length) : conc;
}
// Words are separated by spaces (for now). GF has other lexers/unlexers.
function gf_lex(s) { return s.split(" "); }
function gf_unlex(ws) { return ws.join(" "); }
function update_language_menu(menu,grammar) {
// Replace the options in the menu with the languages in the grammar
var lang=grammar.languages;