| Index: dart/site/try/src/selection.dart
|
| diff --git a/dart/site/try/src/selection.dart b/dart/site/try/src/selection.dart
|
| index c0d606eb7d11ff4eb01d1c5e731a914b908cadb3..e458bae81b1e5d263c12579a38fb5bbecc96a393 100644
|
| --- a/dart/site/try/src/selection.dart
|
| +++ b/dart/site/try/src/selection.dart
|
| @@ -42,7 +42,12 @@ class TrySelection {
|
| [Decoration decoration]) {
|
| if (start == end) return null;
|
|
|
| - Text textNode = new Text(text.substring(start, end));
|
| + String substring = text.substring(start, end);
|
| + if (substring == '\n') {
|
| + // Don't add decorations to trailing newline.
|
| + decoration = null;
|
| + }
|
| + Text textNode = new Text(substring);
|
|
|
| if (start <= globalOffset && globalOffset <= end) {
|
| anchorNode = textNode;
|
|
|