mirror of
https://github.com/neovim/neovim.git
synced 2026-05-02 12:04:58 +00:00
vim-patch:8.2.3679: objc file detected as Octave (#16446)
Problem: objc file detected as Octave. (Antony Lee)
Solution: Detect objc by preprocessor lines. (Doug Kearns, closes vim/vim#9223,
closes vim/vim#9220)
7329cfab36
This commit is contained in:
@@ -866,6 +866,16 @@ func Test_m_file()
|
||||
call assert_equal('objc', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['#include <header.h>'], 'Xfile.m')
|
||||
split Xfile.m
|
||||
call assert_equal('objc', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['#define FORTY_TWO'], 'Xfile.m')
|
||||
split Xfile.m
|
||||
call assert_equal('objc', &filetype)
|
||||
bwipe!
|
||||
|
||||
" Octave
|
||||
|
||||
call writefile(['# Octave line comment'], 'Xfile.m')
|
||||
|
||||
Reference in New Issue
Block a user