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)
This commit is contained in:
committed by
Bram Moolenaar
parent
4c42c7eef4
commit
6e5a9f9482
4
runtime/autoload/dist/script.vim
vendored
4
runtime/autoload/dist/script.vim
vendored
@ -338,7 +338,9 @@ def DetectFromText(line1: string)
|
||||
set ft=virata
|
||||
|
||||
# Strace
|
||||
elseif line1 =~ '[0-9:.]* *execve(' || line1 =~ '^__libc_start_main'
|
||||
# inaccurate fast match first, then use accurate slow match
|
||||
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
|
||||
|| line1 =~ '^__libc_start_main'
|
||||
set ft=strace
|
||||
|
||||
# VSE JCL
|
||||
|
||||
Reference in New Issue
Block a user