Pick up annotations from the character on the left of the cursor

This commit is contained in:
Trevor Parscal 2011-12-01 00:58:51 +00:00
parent f098a24c8a
commit f9ad5bed54

View file

@ -152,7 +152,7 @@ es.SurfaceView.prototype.addInsertionAnnotation = function( annotation ) {
es.SurfaceView.prototype.loadInsertionAnnotations = function( annotation ) {
this.insertionAnnotations =
this.model.getDocument().getAnnotationsFromOffset( this.currentSelection.to );
this.model.getDocument().getAnnotationsFromOffset( this.currentSelection.to - 1 );
// Filter out annotations that aren't textStyles or links
for ( var i = 0; i < this.insertionAnnotations.length; i++ ) {
if ( !this.insertionAnnotations[i].type.match( /(textStyle\/|link\/)/ ) ) {