mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-14 07:41:14 +01:00
Fixed cursor tracking initialization.
This commit is contained in:
parent
e4de3fa871
commit
d19fa309f7
1 changed files with 16 additions and 2 deletions
|
@ -742,7 +742,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.applySettings(i);
|
this.applySettings(i);
|
||||||
|
this.cursorTracking(i);
|
||||||
this.setActive(i);
|
this.setActive(i);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1275,7 +1275,21 @@
|
||||||
|
|
||||||
i = i || this.getActive();
|
i = i || this.getActive();
|
||||||
if (! i) return;
|
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();
|
codiad.active.savePosition();
|
||||||
$('#cursor-position')
|
$('#cursor-position')
|
||||||
|
|
Loading…
Reference in a new issue