summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-14 23:37:38 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-14 23:37:38 +0200
commite95c5f49aae37ac650fa1078032e61d8cc42af62 (patch)
tree0f01dacb47215725d091772ddd1d854a7e366679
parentba11e0f1ad214a0696ab48fbfdf06afd08ad2f91 (diff)
downloadvim-polyglot-e95c5f49aae37ac650fa1078032e61d8cc42af62.tar.gz
vim-polyglot-e95c5f49aae37ac650fa1078032e61d8cc42af62.zip
Check indentation with 1024 lines as fallback, fixes #588
-rw-r--r--ftdetect/polyglot.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 6794397b..c98c27d7 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -2735,6 +2735,9 @@ if !has_key(s:disabled_packages, 'autoindent')
if s:guess(getline(1, 32))
return
endif
+ if s:guess(getline(1, 1024))
+ return
+ endif
let pattern = polyglot#sleuth#GlobForFiletype(&filetype)
if len(pattern) == 0
return