Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix cpoptions handling in indent file

During a discussion on vim-dev several runtime files have been identified whose
handling of 'cpoptions' should be improved. You can re-read the whole
discussion at:
http://thread.gmane.org/gmane.editors.vim.devel/32151

The corresponding vim help is available at:
:help 'cpoptions'

This patch fixes one of those issues identified in a runtimefile.
  • Loading branch information...
commit f9daf5add15cb9e6c53c3492104d91de27075fa4 1 parent d663101
Thilo Six authored committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 indent/gitolite.vim
8 indent/gitolite.vim
View
@@ -2,7 +2,7 @@
" Language: gitolite configuration
" URL: https://github.com/tmatilai/gitolite.vim
" Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>
-" Last Change: 2011-11-01
+" Last Change: 2011-12-24
if exists("b:did_indent")
finish
@@ -18,6 +18,9 @@ if exists("*GetGitoliteIndent")
finish
endif
+let s:cpo_save = &cpo
+set cpo&vim
+
function! GetGitoliteIndent()
let prevln = prevnonblank(v:lnum-1)
let pline = getline(prevln)
@@ -37,3 +40,6 @@ function! GetGitoliteIndent()
return 0
endif
endfunction
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
Please sign in to comment.
Something went wrong with that request. Please try again.