Mercurial > vim
comparison runtime/autoload/dist/ft.vim @ 26628:7efd8f561d04 v8.2.3843
patch 8.2.3843: dep3patch files are not recognized
Commit: https://github.com/vim/vim/commit/647ab4cede4dbf412d24748f8e0a64d1cb9239f4
Author: James McCoy <jamessan@jamessan.com>
Date: Fri Dec 17 20:52:57 2021 +0000
patch 8.2.3843: dep3patch files are not recognized
Problem: Dep3patch files are not recognized.
Solution: Recognize dep3patch files by their location and content. (James
McCoy, closes #9367)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 17 Dec 2021 22:00:05 +0100 |
parents | c725b8e17f1f |
children | f0d7cb510ce3 |
comparison
equal
deleted
inserted
replaced
26627:a56abea18a57 | 26628:7efd8f561d04 |
---|---|
809 endif | 809 endif |
810 let lnum = lnum + 1 | 810 let lnum = lnum + 1 |
811 endwhile | 811 endwhile |
812 endfunc | 812 endfunc |
813 | 813 |
814 " This function is called for all files under */debian/patches/*, make sure not | |
815 " to non-dep3patch files, such as README and other text files. | |
816 func dist#ft#Dep3patch() | |
817 if expand('%:t') ==# 'series' | |
818 return | |
819 endif | |
820 | |
821 for ln in getline(1, 100) | |
822 if ln =~# '^\%(Description\|Subject\|Origin\|Bug\|Forwarded\|Author\|From\|Reviewed-by\|Acked-by\|Last-Updated\|Applied-Upstream\):' | |
823 setf dep3patch | |
824 return | |
825 elseif ln =~# '^---' | |
826 " end of headers found. stop processing | |
827 return | |
828 endif | |
829 endfor | |
830 endfunc | |
814 | 831 |
815 " Restore 'cpoptions' | 832 " Restore 'cpoptions' |
816 let &cpo = s:cpo_save | 833 let &cpo = s:cpo_save |
817 unlet s:cpo_save | 834 unlet s:cpo_save |