From ec6053a57cdb6e39f890ffe844a8431d5151d8b9 Mon Sep 17 00:00:00 2001 From: David Braun Date: Sat, 16 Feb 2013 16:32:06 -0300 Subject: [PATCH] Refactor clearAnnotations. --- lib/ace/edit_session.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index 0c7ac769..24a654dd 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -754,8 +754,7 @@ var EditSession = function(text, mode) { * Clears all the annotations for this session. This function also triggers the `'changeAnnotation'` event. **/ this.clearAnnotations = function() { - this.$annotations = []; - this._emit("changeAnnotation", {}); + this.setAnnotations([]); }; /**