~axvr/ascribe.vim unlisted

3fcfc71f136b8a567ba29906c860256133edfd7f — Alex Vear 5 months ago ec557dd
Fix indentation behaviour when 'expand-tab' is disabled

Previously when 'expand-tab' was explicitly disabled, Ascribe would not
respect the user's chosen tab width.
1 files changed, 5 insertions(+), 5 deletions(-)

M autoload/ascribe.vim
M autoload/ascribe.vim => autoload/ascribe.vim +5 -5
@@ 21,18 21,18 @@ function ascribe#set_up_buffer(file)
    endif

    " Indentation
    if l:attrs['tab-stop'] !=# 'unspecified'
        call s:setOptVal(['softtabstop', 'shiftwidth', 'tabstop'], l:attrs['tab-stop'])
    endif

    let l:et = l:attrs['expand-tab']
    if l:et !=# 'unspecified'
        if l:et ==# 'unset'
            call s:setOptVal(['softtabstop', 'shiftwidth'], '8')
            call s:setOptVal(['softtabstop', 'shiftwidth'], &l:tabstop)
        endif
        call s:setOptBool(['expandtab'], l:et)
    endif

    if l:attrs['tab-stop'] !=# 'unspecified'
        call s:setOptVal(['softtabstop', 'shiftwidth'], l:attrs['tab-stop'])
    endif

    " Max line length
    call s:setOptVal(['textwidth'], l:attrs['line-length'])