@@ -83,9 +83,9 @@ module.exports = {
8383 } ) ;
8484 } ,
8585
86- $getFirstColumn : function ( path , row ) {
86+ $getFirstColumn : function ( row ) {
8787 var editor = editors . currentEditor ;
88- if ( path || ! editor || editor . path != "ext/code/code" || ! editor . amlEditor )
88+ if ( ! editor || editor . path != "ext/code/code" || ! editor . amlEditor )
8989 return 0 ;
9090 var line = editor . getDocument ( ) . getLine ( row ) ;
9191 if ( ! line )
@@ -140,9 +140,14 @@ module.exports = {
140140 if ( ! lastResult . isDeferred )
141141 break ;
142142 }
143+
144+ var _self = this ;
143145 var path = lastResult . path ? ide . davPrefix . replace ( / [ \/ ] + $ / , "" ) + "/" + lastResult . path : undefined ;
146+
144147 editors . gotoDocument ( {
145- column : lastResult . column !== undefined ? lastResult . column : this . $getFirstColumn ( path , lastResult . row ) ,
148+ getColumn : function ( ) {
149+ return lastResult . column !== undefined ? lastResult . column : _self . $getFirstColumn ( lastResult . row ) ;
150+ } ,
146151 row : lastResult . row + 1 ,
147152 node : path ? undefined : tabEditors . getPage ( ) . xmlRoot ,
148153 animate : true ,
@@ -161,7 +166,7 @@ module.exports = {
161166 var preceding = util . retrievePreceedingIdentifier ( line , cursor . column ) ;
162167 var column = cursor . column - preceding . length ;
163168 if ( column === oldPos . column )
164- column = this . $getFirstColumn ( null , cursor . row ) ;
169+ column = this . $getFirstColumn ( cursor . row ) ;
165170 var newPos = { row : cursor . row , column : column } ;
166171 editor . getSelection ( ) . setSelectionRange ( { start : newPos , end : newPos } ) ;
167172 } ,
0 commit comments