diff --git a/Editor.js b/Editor.js index 14e2c744..47274acf 100644 --- a/Editor.js +++ b/Editor.js @@ -505,10 +505,9 @@ Editor.prototype = } if (this.selection) { - this.renderer.updateMarker(this.selection, this.getSelectionRange()); - } else { - this.selection = this.renderer.addMarker(this.getSelectionRange(), "selection"); + this.renderer.removeMarker(this.selection); } + this.selection = this.renderer.addMarker(this.getSelectionRange(), "selection"); }, selectUp : function() { diff --git a/VirtualRenderer.js b/VirtualRenderer.js index 0bd1efa7..3839ab50 100644 --- a/VirtualRenderer.js +++ b/VirtualRenderer.js @@ -231,15 +231,6 @@ VirtualRenderer.prototype.removeMarker = function(markerId) } }; -VirtualRenderer.prototype.updateMarker = function(markerId, range) -{ - var marker = this.markers[markerId]; - if (marker) { - marker.range = range; - this.draw(); - } -}; - VirtualRenderer.prototype.updateCursor = function(position) { this.cursorPos = {