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:
parent
d3cbc7644f
commit
86f3ada8ea
|
@ -143,7 +143,7 @@ impl<T: LineFormatter> Editor<T> {
|
||||||
let mut lei = 0;
|
let mut lei = 0;
|
||||||
let mut le_count = 0;
|
let mut le_count = 0;
|
||||||
for i in 0us..8 {
|
for i in 0us..8 {
|
||||||
if line_ending_histogram[i] > le_count {
|
if line_ending_histogram[i] >= le_count {
|
||||||
lei = i;
|
lei = i;
|
||||||
le_count = line_ending_histogram[i];
|
le_count = line_ending_histogram[i];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user