unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.43k stars 54 forks source link

Blacklisting not working when both g:qs_buftype_blacklist and g:qs_filetype_blacklist are set #75

Closed adolfocorreia closed 3 years ago

adolfocorreia commented 3 years ago

It seems that line 16 in autoload/quick_scope.vim should read

  if g:qs_enable && (!exists('b:qs_local_disable') || !b:qs_local_disable) && index(get(g:, 'qs_buftype_blacklist', []), &buftype) < 0 && index(get(g:, 'qs_filetype_blacklist', []), &filetype) < 0

instead of

  if g:qs_enable && (!exists('b:qs_local_disable') || !b:qs_local_disable) && index(get(g:, 'qs_buftype_blacklist', []), &buftype) && index(get(g:, 'qs_filetype_blacklist', []), &filetype) < 0

Note that there is a missing < 0 check after the buffer type blacklist lookup.