Don't request auto-indent if there is no language assigned on the buffer

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo 2021-10-08 10:25:16 -06:00
parent b4680144c5
commit 810315e04c

View File

@ -1534,7 +1534,7 @@ impl Buffer {
self.last_edit = edit.timestamp.local();
self.version.observe(edit.timestamp.local());
if autoindent {
if autoindent && self.language.is_some() {
let ranges = edit.ranges.iter().map(|range| {
Anchor {
offset: range.start,