patch 9.0.1464: strace filetype detection is expensive
Problem: Strace filetype detection is expensive.
Solution: Match with a cheap pattern first. (Federico Mengozzi,
closes #12220)
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 0b8b52c..60e4f30 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -733,6 +733,11 @@
filetype off
endfunc
+" Content lines that should not result in filetype detection
+let s:false_positive_checks = {
+ \ '': [['test execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0']],
+ \ }
+
" Filetypes detected from the file contents by scripts.vim
let s:script_checks = {
\ 'virata': [['% Virata'],
@@ -824,6 +829,7 @@
endfunc
func Test_script_detection()
+ call Run_script_detection(s:false_positive_checks)
call Run_script_detection(s:script_checks)
call Run_script_detection(s:script_env_checks)
endfunc
diff --git a/src/version.c b/src/version.c
index 6c8d76e..c050afe 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1464,
+/**/
1463,
/**/
1462,