Fixes an issue with numbered lists.

When the selection spanned one or more characters (the selection was not collapsed) in a numbered list, pressing 'enter' did not cause the selection to be deleted. This fixes that issue.

For example (`|` denotes the selection):

```
1. This is a |list |item.
```

Previously, pressing `Enter` caused this to happen:

```
1. This is a |list |
2. item
```

Whereas the correct behaviour, which this commit implements, would be:

```
1. This is a
2. |item
```