summaryrefslogtreecommitdiffstats
path: root/indent/python.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-04-14 13:17:26 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-04-14 13:17:26 +0200
commit14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 (patch)
treedea8d2398a9377a0eee7786776e3cd420ce1ee89 /indent/python.vim
parente86e0ad36ef9501acbc3e8c63a1d4fab104e47cb (diff)
downloadvim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.tar.gz
vim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.zip
Update
Diffstat (limited to 'indent/python.vim')
-rw-r--r--indent/python.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/indent/python.vim b/indent/python.vim
index 475bbf40..156833d4 100644
--- a/indent/python.vim
+++ b/indent/python.vim
@@ -160,8 +160,8 @@ function! s:find_start_of_block(lnum, types, skip, multiple) abort
else
let re_skip = ''
endif
- let lnum = a:lnum
- let last_indent = indent(lnum) + 1
+ let last_indent = indent(a:lnum) + 1
+ let lnum = a:lnum - 1
while lnum > 0 && last_indent > 0
let indent = indent(lnum)
if indent < last_indent
@@ -262,7 +262,7 @@ function! s:indent_like_block(lnum)
endif
let [blocks, skip] = blocks_ignore
- let indents = s:find_start_of_block(a:lnum - 1, blocks, skip, multiple)
+ let indents = s:find_start_of_block(a:lnum, blocks, skip, multiple)
if empty(indents)
return -1
endif