changeset 28604:9c70f7df6d61 v8.2.4826

patch 8.2.4826: .cshtml files are not recognized Commit: https://github.com/vim/vim/commit/1f435dafff2452e0b55d1ca457ce7402e526e92a Author: jvoisin <julien.voisin@dustri.org> Date: Mon Apr 25 17:40:56 2022 +0100 patch 8.2.4826: .cshtml files are not recognized Problem: .cshtml files are not recognized. Solution: Use html filetype for .cshtml files. (Julien Voisin, closes https://github.com/vim/vim/issues/10212)
author Bram Moolenaar <Bram@vim.org>
date Mon, 25 Apr 2022 18:45:04 +0200
parents d258003fceed
children f158ba80583a
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -821,6 +821,7 @@ au BufNewFile,BufRead *.t.html			setf ti
 
 " HTML (.shtml and .stm for server side)
 au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm  call dist#ft#FThtml()
+au BufNewFile,BufRead *.cshtml			setf html
 
 " HTML with Ruby - eRuby
 au BufNewFile,BufRead *.erb,*.rhtml		setf eruby
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -258,6 +258,7 @@ let s:filename_checks = {
     \ 'rnoweb': ['file.rnw', 'file.snw'],
     \ 'rrst': ['file.rrst', 'file.srst'],
     \ 'template': ['file.tmpl'],
+    \ 'html': ['file.html', 'file.htm', 'file.cshtml'],
     \ 'htmlm4': ['file.html.m4'],
     \ 'httest': ['file.htt', 'file.htb'],
     \ 'ibasic': ['file.iba', 'file.ibi'],
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4826,
+/**/
     4825,
 /**/
     4824,