We rely on the 'or' operator to prevent us from calling
'notifyCursorLeaves' if one of the two cursors is broken. This doesn't
work when using the '|' operator. The compiler 'optimizes' the code in
such a way that we always call notifyCursorLeaves anyway. Using the '||'
operator fixes this.
// Notify left insets
if (cur != old) {
- bool badcursor = old.fixIfBroken() | cur.fixIfBroken()
- | notifyCursorLeavesOrEnters(old, cur);
+ bool badcursor = old.fixIfBroken() || cur.fixIfBroken()
+ || notifyCursorLeavesOrEnters(old, cur);
if (badcursor)
cursor().fixIfBroken();
}