]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vimrc
vimrc: Fix compatibility with Vim 6.4 and later.
[config/dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index 306e838615498c0975fefa448bdb7b7e524dea24..8a6e07f4dc7ecf25224bc5ea4533232b881ddc76 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -447,10 +447,12 @@ if has('statusline')
     set statusline+=%m                " [+] if buffer was modified,
                                       " [-] if 'modifiable' is off
     set statusline+=%r                " [RO] if buffer is read only
-    set statusline+=%#Error#          " display warnings
-    set statusline+=%{SFF()}          "   - unexpected file format
-    set statusline+=%{SFE()}          "   - unexpected file encoding
-    set statusline+=%##               " continue with normal colors
+    if v:version >= 700               " %#..# needs 7.0
+        set statusline+=%#Error#      " display warnings
+        set statusline+=%{SFF()}      "   - unexpected file format
+        set statusline+=%{SFE()}      "   - unexpected file encoding
+        set statusline+=%##           " continue with normal colors
+    endif
 
     " on the right
     set statusline+=%=                " right align