diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-06-02 10:02:33 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-06-02 10:02:33 +1200 |
commit | b41d085cdcaf1f957b2c219630f332023baba72e (patch) | |
tree | 5fa8d652c53f7c0e66b1d955f75a871aeb804f3d | |
parent | Merge branch 'hotfix/v0.1.1' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-detect-indent-b41d085cdcaf1f957b2c219630f332023baba72e.tar.gz vim-detect-indent-b41d085cdcaf1f957b2c219630f332023baba72e.zip |
Merge branch 'hotfix/v0.1.2'v0.1.2
* hotfix/v0.1.2:
Check a buffer is worth detecting indent
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | autoload/detect_indent.vim | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -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 |