on master help sign in
Report errors if :r fails in case split script
328dfe6Edwin Brady
contribs/idriscasesplit.vim+9−5
@@ -6,11 +6,15 @@ function CaseSplit()
6 let word = expand("<cword>")
6 let word = expand("<cword>")
7 let fn = "idris --client :cs! " . cline . " " . word
7 let fn = "idris --client :cs! " . cline . " " . word
8 let tc = system("idris --client :r")
8 let tc = system("idris --client :r")
9+ if (tc is "")
9− let result = system(fn)
10+ let result = system(fn)
10− e
11+ e
11− call winrestview(view)
12+ call winrestview(view)
12− if (! (result is ""))
13+ if (! (result is ""))
13− echo result
14+ echo result
15+ endif
16+ else
17+ echo tc
14 endif
18 endif
15endfunction
19endfunction
16
20