Yggdroot / indentLine

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

Fix unexpected feature enabling by AutoResetWidth #311

Closed mnishz closed 4 years ago

mnishz commented 4 years ago

First, thank you for your great plugin. It's very helpful.

I found that this feature is unexpectedly enabled on help file by AutoResetWidth. This is caused because help files have modeline that sets shiftwidth or tabstop buffer locally, and AutoResetWidth just refers to b:indentLine_enabled and g:indentLine_enabled, but not filter settings. In other cases, just typing :set shiftwidth=4 can cause the same issue. And this probably be the same issue as #306.

I've created my fix. Could you merge this if it looks good?

How to fix: When b:indentLine_enabled doesn't exist and g:indentLine_enabled == 1, refer to s:Filter() instead of the value itself.

CC: @matveyt, @Mike325

mnishz commented 4 years ago

Ahh, #297, #298 and #301 might be the same issues.

Yggdroot commented 4 years ago

Thanks.