Unverified Commit bbe5ae70 authored by Paul Ganssle's avatar Paul Ganssle Committed by GitHub
Browse files

Notify users of missing Python lazily (#1210)

Currently this message shows up with no context prior to the start of
Vim. By changing this to a lazy message, the user will only be notified
of a problem with the Black plugin when they are attempting to use the
Black plugin.

Co-authored-by: default avatarŁukasz Langa <lukasz@langa.pl>
parent 8fef74cf
Loading
Loading
Loading
Loading
+5 −0
Changes for plugin/black.vim: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,12 @@
"    - restore cursor/window position after formatting

if v:version < 700 || !has('python3')
    func! __BLACK_MISSING()
        echo "The black.vim plugin requires vim7.0+ with Python 3.6 support."
    endfunc
    command! Black :call __BLACK_MISSING()
    command! BlackUpgrade :call __BLACK_MISSING()
    command! BlackVersion :call __BLACK_MISSING()
    finish
endif