Skip to content

Commit

Permalink
Add one second timeout to remote_expr
Browse files Browse the repository at this point in the history
It looks like newer versions of vim can hang if remote_expr
fails, but also allow for a timeout to avoid this.
  • Loading branch information
ardagnir committed Nov 10, 2017
1 parent a8b3fc3 commit 2320f65
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugin/united-front.vim
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ function! s:SendVimInfo()
for x in split(serverlist(),"\n")
if x !=? v:servername && v:servername !=""
"don't give an error if other vim doesn't have united-front
silent! call remote_expr( x, "UnitedFront_ReadFrontFile()")
if v:version >= 800 && has("patch492")
"provide a timeout if supported
silent! call remote_expr(x, "UnitedFront_ReadFrontFile()", "", 1)
else
silent! call remote_expr(x, "UnitedFront_ReadFrontFile()")
endif
endif
endfor
endif
Expand Down

0 comments on commit 2320f65

Please sign in to comment.