Index: trunk/parsers/wikidom/lib/hype/views/es.SurfaceView.js |
— | — | @@ -78,6 +78,8 @@ |
79 | 79 | this.documentView.renderContent(); |
80 | 80 | }; |
81 | 81 | |
| 82 | +es.SurfaceView.boundaries = [' ', '-', '\t', '\r', '\n', '\f']; |
| 83 | + |
82 | 84 | es.SurfaceView.prototype.onMouseDown = function( e ) { |
83 | 85 | var offset = this.documentView.getOffsetFromEvent( e ); |
84 | 86 | this.showCursor( offset ); |
— | — | @@ -154,8 +156,7 @@ |
155 | 157 | var end = this.documentView.getRenderedLineRange( this.cursor.offset ).end |
156 | 158 | var data = this.documentView.getModel().data; |
157 | 159 | if ( es.DocumentModel.isContentData( data, end ) ) { |
158 | | - // TODO: Support all of this /([ \-\t\r\n\f])/g, not just space |
159 | | - while( data[ end - 1] === ' ' ) { |
| 160 | + while( $.inArray( data[ end - 1 ], es.SurfaceView.boundaries ) ) { |
160 | 161 | end--; |
161 | 162 | } |
162 | 163 | } |