Small tweak to indentation style auto-detection.

Very slightly favor larger indentations, instead of very slight favor
smaller indentations.  This is more likely to do the right thing on
very small files.
This commit is contained in:
Nathan Vegdahl 2015-02-16 22:06:48 -08:00
parent d3cbc7644f
commit 86f3ada8ea

View File

@ -143,7 +143,7 @@ impl<T: LineFormatter> Editor<T> {
let mut lei = 0;
let mut le_count = 0;
for i in 0us..8 {
if line_ending_histogram[i] > le_count {
if line_ending_histogram[i] >= le_count {
lei = i;
le_count = line_ending_histogram[i];
}