Permalink
Browse files

Refactoring.

  • Loading branch information...
1 parent 4ab29db commit 5ff5dad4e3dca7452d7f260694608075ee0434a5 @tarao committed Mar 25, 2010
Showing with 4 additions and 5 deletions.
  1. +1 −3 app.js
  2. +3 −2 ui.js
View
4 app.js
@@ -93,9 +93,7 @@ if (typeof LambdaJS.App == 'undefined') LambdaJS.App = {};
}
return true;
}, self.cont);
- }, function(evnt) {
- return false;
- }, function(evnt) {
+ }, null, function(evnt) {
if ((evnt.charCode || evnt.keyCode) == 220) {
UI.insertText(self.console.input, '\u03bb');
return true;
View
5 ui.js
@@ -400,7 +400,8 @@ if (typeof UI == 'undefined') var UI = {};
self.reposition();
var history = self.history.clone();
new Observer(self.input, 'onkeyup', function(e) {
- switch (e.event.charCode || e.event.keyCode) {
+ var evnt = e.event;
+ switch (evnt.charCode || evnt.keyCode) {
case 13: // Enter
var text = self.input.value;
self.history.push(text);
@@ -410,7 +411,7 @@ if (typeof UI == 'undefined') var UI = {};
setTimeout(function(){ self.command(text); }, 0);
break;
default:
- if (!self.keyup(e.event)) return;
+ if (!self.keyup(evnt)) return;
}
e.stop();
});

0 comments on commit 5ff5dad

Please sign in to comment.