Fixed issue where mouse position was set too often resulting in periodical line jumping.

This commit is contained in:
xevidos 2019-04-23 14:00:07 -04:00
parent a24a8daacc
commit e9c40fa851

View File

@ -399,19 +399,21 @@
this.highlightEntry(path, moveToTabList);
if(path != this.getPath()) {
codiad.editor.setSession(this.sessions[path]);
this.history.push(path);
$.get(this.controller, {'action':'focused', 'path':path});
$.get(this.controller, {'action':'focused', 'path':path}, function() {
if( ! ( this.positions[`${path}`] === undefined ) ) {
this.setPosition( this.positions[`${path}`] );
}
});
}
/* Check for users registered on the file. */
this.check(path);
if( ! ( this.positions[`${path}`] === undefined ) ) {
this.setPosition( this.positions[`${path}`] );
}
/* Notify listeners. */
amplify.publish('active.onFocus', path);
},