TextWidget: refactor word detection, explicit left/right naming