Yggdroot / indentLine

A vim plugin to display the indention levels with thin vertical lines
MIT License
4.14k stars 227 forks source link

s:AutoResetWidth() breaks s:Filter() #306

Closed matveyt closed 4 years ago

matveyt commented 4 years ago

Steps to reproduce:

let g:indentLine_autoResetWidth = 1 "default
let g:indentLine_bufTypeExclude = ['help']
set modeline tabstop=4

:help

Now unexpectedly 'help' has indentLine enabled.

The reason is that standard 'help' buffer has ts=8 in the modeline which results in triggering OptionSet and then s:AutoResetWidth() early. But s:AutoResetWidth() initializes b:indentLine_enabled without consulting s:Filter(). And so 'help' buffer passes any filter check unexpectedly.