aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-06-02 10:02:33 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-06-02 10:02:33 +1200
commitb41d085cdcaf1f957b2c219630f332023baba72e (patch)
tree5fa8d652c53f7c0e66b1d955f75a871aeb804f3d
parentMerge branch 'hotfix/v0.1.1' (diff)
parentBump VERSION (diff)
downloadvim-detect-indent-0.1.2.tar.gz (sig)
vim-detect-indent-0.1.2.zip
Merge branch 'hotfix/v0.1.2'v0.1.2
* hotfix/v0.1.2: Check a buffer is worth detecting indent
-rw-r--r--VERSION2
-rw-r--r--autoload/detect_indent.vim5
2 files changed, 6 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index 17e51c3..d917d3e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.1
+0.1.2
diff --git a/autoload/detect_indent.vim b/autoload/detect_indent.vim
index 71a43e8..feaa5f9 100644
--- a/autoload/detect_indent.vim
+++ b/autoload/detect_indent.vim
@@ -6,6 +6,11 @@ endfunction
" Entry point for plugin
function! detect_indent#() abort
+ " If this is a special buffer, don't do anything
+ if index(['nofile', 'quickfix', 'help'], &buftype) >= 0
+ return
+ endif
+
" For spaces, we count both the total space-indented lines, and also the
" count of lines indexed by space count, so that if we need to, we can
" figure out a good 'shiftwidth' setting; for tabs, we just count the