X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/445ce093b0aaaf767b18c052edbe688e82d18480..b430740f94385419258e16fdf5f22dd20a5637e6:/indent/python.vim?ds=sidebyside diff --git a/indent/python.vim b/indent/python.vim index 177b8ad..461e962 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -179,7 +179,7 @@ function! s:indent_like_previous_line(lnum) let text = getline(lnum) let start = s:find_start_of_multiline_statement(lnum) let base = indent(start) - let current = indent(lnum + 1) + let current = indent(a:lnum) " Jump to last character in previous line. call cursor(lnum, len(text)) @@ -218,7 +218,7 @@ function! s:indent_like_previous_line(lnum) " If this line is dedented and the number of indent spaces is valid " (multiple of the indentation size), trust the user - let dedent_size = current - indent(a:lnum - 1) + let dedent_size = current - base if dedent_size < 0 && current % s:sw() == 0 return -1 endif