From 3686b2e50a95ddbcfa8850d99ec97c08847406a4 Mon Sep 17 00:00:00 2001 From: chilicuil Date: Thu, 3 Nov 2011 03:06:00 -0600 Subject: [PATCH] added guard --- plugin/tetris.vim | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugin/tetris.vim b/plugin/tetris.vim index f5e5e9b..b1e8c6a 100644 --- a/plugin/tetris.vim +++ b/plugin/tetris.vim @@ -9,6 +9,16 @@ " If your name is not here, but should be, drop me a mail " TODO FocusGained FocusLost Auto calibration during play + +if exists("g:loaded_tetris") || &cp + finish +endif + +let g:loaded_tetris = 1 +let s:keepcpo = &cpo + +set cpo&vim + let s:s='-Tetris_game-' let s:WIDTH=10|let s:NEXTXPOS=16|let s:NEXTYPOS=2 let s:CLEAR=0|let s:CHECK=1|let s:DRAW=2 @@ -310,4 +320,7 @@ fu! s:Main() endf nmap te :cal Main() -" vi:sw=1 +let &cpo= s:keepcpo +unlet s:keepcpo + +" vi:sw=1 \ No newline at end of file