Correct report unchanged formatting when reading from stdin. (#604)
* Correct report unchanged formatting when reading from stdin.
* Typo.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27a1069..9638bed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
* Don't split after `<` when a collection is in statement position (#589).
* Force a split if the cascade target has non-obvious precedence (#590).
* Split more often if a cascade target contains a split (#591).
+* Correctly report unchanged formatting when reading from stdin.
# 0.2.16
diff --git a/bin/format.dart b/bin/format.dart
index e1eabbc..512928b 100644
--- a/bin/format.dart
+++ b/bin/format.dart
@@ -197,8 +197,8 @@
selectionStart: selectionStart,
selectionLength: selectionLength);
var output = formatter.formatSource(source);
- options.reporter
- .afterFile(null, "<stdin>", output, changed: source != output);
+ options.reporter.afterFile(null, "<stdin>", output,
+ changed: source.text != output.text);
return;
} on FormatterException catch (err) {
stderr.writeln(err.message());