0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.0.1285: occasional crash when using a channel

Problem:    Occasional crash when using a channel. (Marek)
Solution:   Decrement reference count later. (closes #2315)
This commit is contained in:
Bram Moolenaar
2017-11-11 15:37:45 +01:00
parent 462455ee8b
commit d09a206ee9
7 changed files with 117 additions and 107 deletions

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2017 Nov 09
" Last change: 2017 Nov 11
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -66,19 +66,19 @@ if s:line1 =~# "^#!"
" Bourne-like shell scripts: bash bash2 ksh ksh93 sh
if s:name =~# '^\(bash\d*\|\|ksh\d*\|sh\)\>'
call filetype#SetFileTypeSH(s:line1) " defined in filetype.vim
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
" csh scripts
elseif s:name =~# '^csh\>'
if exists("g:filetype_csh")
call filetype#SetFileTypeShell(g:filetype_csh)
call dist#ft#SetFileTypeShell(g:filetype_csh)
else
call filetype#SetFileTypeShell("csh")
call dist#ft#SetFileTypeShell("csh")
endif
" tcsh scripts
elseif s:name =~# '^tcsh\>'
call filetype#SetFileTypeShell("tcsh")
call dist#ft#SetFileTypeShell("tcsh")
" Z shell scripts
elseif s:name =~# '^zsh\>'
@@ -185,7 +185,7 @@ else
" Bourne-like shell scripts: sh ksh bash bash2
if s:line1 =~# '^:$'
call filetype#SetFileTypeSH(s:line1) " defined in filetype.vim
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
" Z shell scripts
elseif s:line1 =~# '^#compdef\>' || s:line1 =~# '^#autoload\>' ||