aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/shebang_change_filetype.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/shebang_change_filetype.vim b/autoload/shebang_change_filetype.vim
index 081eaf1..f9911bd 100644
--- a/autoload/shebang_change_filetype.vim
+++ b/autoload/shebang_change_filetype.vim
@@ -1,7 +1,7 @@
" Check whether the first line was changed and looks like a shebang, and if
" so, re-run filetype detection
function! shebang_change_filetype#Check() abort
- if line('''[') == 1 && getline(1) =~# '^#!'
+ if line("'[") == 1 && strpart(getline(1), 0, 2) ==# '#!'
doautocmd filetypedetect BufRead
endif
endfunction