Skip to content

Commit

Permalink
Remove block_level
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Sep 19, 2023
1 parent 0f1fe78 commit 0e06660
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions autoload/dpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@ function dpp#begin(path, options = {}) abort
call dpp#_init()
endif

if a:path ==# '' || g:dpp#_block_level != 0
call dpp#util#_error('Invalid begin/end block usage.')
return 1
endif

let g:dpp#_options = extend(g:dpp#_options, a:options)

let g:dpp#_block_level += 1

let g:dpp#_base_path = dpp#util#_expand(a:path)
if g:dpp#_base_path[-1:] ==# '/'
let g:dpp#_base_path = g:dpp#_base_path[: -2]
Expand Down Expand Up @@ -78,13 +71,6 @@ function dpp#begin(path, options = {}) abort
endfor
endfunction
function dpp#end() abort
if g:dpp#_block_level != 1
call dpp#util#_error('Invalid begin/end block usage.')
return 1
endif

let g:dpp#_block_level -= 1

if !has('vim_starting')
call dpp#source(g:dpp#_plugins->values()
\ ->filter({ _, val ->
Expand Down Expand Up @@ -169,8 +155,6 @@ function dpp#_init() abort
let g:dpp#_plugins = {}
let g:dpp#_options = {}

let g:dpp#_block_level = 0

const g:dpp#_progname = has('nvim') && exists('$NVIM_APPNAME') ?
\ $NVIM_APPNAME : v:progname->fnamemodify(':r')
const g:dpp#_init_runtimepath = &runtimepath
Expand Down

0 comments on commit 0e06660

Please sign in to comment.