From: Hynek Schlawack Date: Sun, 20 Jan 2013 11:26:29 +0000 (-0800) Subject: Merge pull request #4 from ElectronicRU/master X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/c0139ddbe2ac7157848d2bf8ac8594bf5c7e8558?hp=8d87647ce346aa2d356682589c6d43c92b5e55a6 Merge pull request #4 from ElectronicRU/master Better colon handling Fix regression that made vim not indent if there was a comment at the end of a line. --- diff --git a/indent/python.vim b/indent/python.vim index 9c93c60..1dabb47 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -174,7 +174,7 @@ function! GetPythonIndent(lnum) " If the previous line ended with a colon and is not a comment, indent " relative to statement start. - if pline =~ ':\s*$' && pline !~ '^\s*#' + if pline =~ '^[^#]*:\s*\(#.*\)\?$' return indent(sslnum) + &sw endif