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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user