summaryrefslogtreecommitdiffstats
path: root/runtime/filetype.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-08-29 22:25:38 +0000
committerBram Moolenaar <Bram@vim.org>2005-08-29 22:25:38 +0000
commitac6e65f88da446bc764ff13a23d854fd72ffedcf (patch)
tree4c4cd8700dcb53ac3a236a056320e2caf062a23d /runtime/filetype.vim
parent81f1ecbc4dc885a4757e5cc64002f4b22f397f18 (diff)
updated for version 7.0138v7.0138
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r--runtime/filetype.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 55cd02d328..33f312a929 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Aug 24
+" Last Change: 2005 Aug 29
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1200,7 +1200,7 @@ function! s:FTprogress_asm()
" This function checks for an assembly comment the first ten lines.
" If not found, assume Progress.
let lnum = 1
- while lnum <= 10
+ while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
if line =~ '^\s*;' || line =~ '^\*'
call s:FTasm()
@@ -1227,9 +1227,9 @@ function! s:FTprogress_pascal()
" Look for either an opening comment or a program start.
" If not found, assume Progress.
let lnum = 1
- while lnum <= 10
+ while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
- if line =~ '^\s*\(program\|procedure\|function\|const\|type\|var\)\>'
+ if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
setf pascal
return