From 811ba3ee113532806c8811e4fb48c608736f053a Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Fri, 20 May 2011 19:17:25 +0200 Subject: [PATCH 1/2] Update the activeLine on fold changes. --- lib/ace/editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index ef9b0e8a..480095ce 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -381,6 +381,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(); }; From 5af76c310c11f57f35572f011c86928353156229 Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Fri, 20 May 2011 23:52:06 +0200 Subject: [PATCH 2/2] Call updateHighlightActiveLine in onSelectionChange instead to catch all edge cases. --- lib/ace/editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 480095ce..9ec189e9 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -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)