From 86f3ada8ea4b57ed838f3d8461e20cc47e0f16b9 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Mon, 16 Feb 2015 22:06:48 -0800 Subject: [PATCH] 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. --- src/editor/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 4b23452..61f0f29 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -143,7 +143,7 @@ impl Editor { 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]; }