Fixed cursor tracking initialization.

This commit is contained in:
xevidos 2019-04-17 11:04:55 -04:00
parent e4de3fa871
commit d19fa309f7

View File

@ -742,7 +742,7 @@
}
}
this.applySettings(i);
this.cursorTracking(i);
this.setActive(i);
},
@ -1275,7 +1275,21 @@
i = i || this.getActive();
if (! i) return;
i.selection.on("changeCursor", function(e){
/**
* Update the cursor position now so that when a new file opens,
* we do not have the old cursor data.
*/
$('#cursor-position')
.html(i18n('Ln') + ': '
+ (i.getCursorPosition().row + 1)
+ ' · ' + i18n('Col') + ': '
+ i.getCursorPosition().column
);
//Register the changecursor function so updates continue
i.selection.on( "changeCursor", function( e ) {
codiad.active.savePosition();
$('#cursor-position')