mirror of
				https://github.com/vim/vim.git
				synced 2025-10-31 09:57:14 -04:00 
			
		
		
		
	patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Problem:    Cannot always tell the difference beween tex and rexx files.
Solution:   Recognize tex by a leading backslash. (Martin Tournoij,
            closes #11380)
			
			
This commit is contained in:
		
				
					committed by
					
						 Bram Moolenaar
						Bram Moolenaar
					
				
			
			
				
	
			
			
			
						parent
						
							d8cd6f7427
						
					
				
				
					commit
					bd053f894b
				
			
							
								
								
									
										2
									
								
								runtime/autoload/dist/ft.vim
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								runtime/autoload/dist/ft.vim
									
									
									
									
										vendored
									
									
								
							| @@ -145,7 +145,7 @@ export def FTcls() | |||||||
|     return |     return | ||||||
|   endif |   endif | ||||||
|  |  | ||||||
|   if getline(1) =~ '^%' |   if getline(1) =~ '^\v%(\%|\\)' | ||||||
|     setf tex |     setf tex | ||||||
|   elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' |   elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' | ||||||
|     setf rexx |     setf rexx | ||||||
|   | |||||||
| @@ -1741,6 +1741,11 @@ func Test_cls_file() | |||||||
|   call assert_equal('tex', &filetype) |   call assert_equal('tex', &filetype) | ||||||
|   bwipe! |   bwipe! | ||||||
|  |  | ||||||
|  |   call writefile(['\NeedsTeXFormat{LaTeX2e}'], 'Xfile.cls') | ||||||
|  |   split Xfile.cls | ||||||
|  |   call assert_equal('tex', &filetype) | ||||||
|  |   bwipe! | ||||||
|  |  | ||||||
|   " Rexx |   " Rexx | ||||||
|  |  | ||||||
|   call writefile(['# rexx'], 'Xfile.cls') |   call writefile(['# rexx'], 'Xfile.cls') | ||||||
|   | |||||||
| @@ -695,6 +695,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     771, | ||||||
| /**/ | /**/ | ||||||
|     770, |     770, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user