focusCaretTracker: Minor cleanup
This commit is contained in:
parent
56d96383e2
commit
b04c47c15f
@ -37,14 +37,10 @@ const FocusCaretTracker = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onChanged: function(event) {
|
_onChanged: function(event) {
|
||||||
let update = null;
|
|
||||||
|
|
||||||
if (event.type.indexOf(STATECHANGED) == 0)
|
if (event.type.indexOf(STATECHANGED) == 0)
|
||||||
update = 'focus-changed';
|
this.emit('focus-changed', event);
|
||||||
else if (event.type == CARETMOVED)
|
else if (event.type == CARETMOVED)
|
||||||
update = 'caret-moved';
|
this.emit('caret-moved', event);
|
||||||
if(update != null)
|
|
||||||
this.emit(update, event);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
registerFocusListener: function() {
|
registerFocusListener: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user