Merge remote branch 'upstream/master' into mode-transform

This commit is contained in:
c-spencer 2011-05-25 16:02:17 +01:00
commit bbb4648ebe
35 changed files with 5237 additions and 2517 deletions

View file

@ -144,6 +144,9 @@ var BackgroundTokenizer = function(tokenizer, editor) {
} else if (firstRow == 0) {
state = "start";
doCache = true;
} else if (this.lines.length > 0) {
// Guess that we haven't changed state.
state = this.lines[this.lines.length-1].state;
}
var lines = this.doc.getLines(firstRow, lastRow);

View file

@ -346,6 +346,8 @@ var Editor =function(renderer, session) {
var range = this.selection.getRange();
var style = this.getSelectionStyle();
session.$selectionMarker = session.addMarker(range, "ace_selection", style);
} else {
this.$updateHighlightActiveLine();
}
if (this.$highlightSelectedWord)
@ -381,6 +383,9 @@ var Editor =function(renderer, session) {
};
this.onChangeFold = function() {
// Update the active line marker as due to folding changes the current
// line range on the screen might have changed.
this.$updateHighlightActiveLine();
// TODO: This might be too much updating. Okay for now.
this.renderer.updateFull();
};

View file

@ -39,7 +39,7 @@ define(function(require, exports, module) {
// If you're developing a new keymapping and want to get an idea what's going
// on, then enable debugging.
var DEBUG = false;
var DEBUG = true;
function StateHandler(keymapping) {
this.keymapping = this.$buildKeymappingRegex(keymapping);
@ -197,7 +197,7 @@ StateHandler.prototype = {
// If we pressed any command key but no other key, then ignore the input.
// Otherwise "shift-" is added to the buffer, and later on "shift-g"
// which results in "shift-shift-g" which doesn't make senese.
if (hashId != 0 && (key == "" || String.fromCharCode(0))) {
if (hashId != 0 && (key == "" || key == String.fromCharCode(0))) {
return null;
}