I think we just need the `beg.BOL()` check once at the beginning and we can skip all the `RuneBefore` logic until L263 in that case. eg:

```
if !beg.BOL() {
    r, rlen := beg.RuneBefore()
    //...
}

end.Boffset = beg.Boffset
```