Fix the rest of tempfiles
This commit is contained in:
parent
0739d1a147
commit
038797c6da
2 changed files with 5 additions and 11 deletions
|
|
@ -102,9 +102,9 @@ function highlighter#New()
|
||||||
let result.lines = []
|
let result.lines = []
|
||||||
let result.job = jobstart([g:nvim_nim_exec_nimsuggest, '--v2', '--stdin', expand("%:p")], result)
|
let result.job = jobstart([g:nvim_nim_exec_nimsuggest, '--v2', '--stdin', expand("%:p")], result)
|
||||||
let result.file = expand("%:p")
|
let result.file = expand("%:p")
|
||||||
let tempfile = result.file . ".temp"
|
let result.tempfile = util#WriteMemfile()
|
||||||
call writefile(getline(1, '$'), tempfile)
|
|
||||||
call jobsend(result.job, "highlight " . result.file . ";" . tempfile . ":1:1\nquit\n")
|
call jobsend(result.job, "highlight " . result.file . ";" . result.tempfile . ":1:1\nquit\n")
|
||||||
if !exists("b:highlights")
|
if !exists("b:highlights")
|
||||||
let b:highlights = []
|
let b:highlights = []
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -53,18 +53,12 @@ function! suggest#NewKnown(command, sync, useV2, file, line, col, handler)
|
||||||
let result = copy(s:NimSuggest)
|
let result = copy(s:NimSuggest)
|
||||||
let result.lines = []
|
let result.lines = []
|
||||||
let result.file = a:file
|
let result.file = a:file
|
||||||
let result.tempfile = result.file . ".temp"
|
|
||||||
let result.line = a:line
|
let result.line = a:line
|
||||||
let result.col = a:col
|
let result.col = a:col
|
||||||
let result.handler = a:handler
|
let result.handler = a:handler
|
||||||
let result.isAsync = has("nvim") && !a:sync && g:nvim_nim_enable_async
|
let result.isAsync = has("nvim") && !a:sync && g:nvim_nim_enable_async
|
||||||
|
let result.tempfile = util#WriteMemfile()
|
||||||
" if a:useTempFile
|
let query = a:command . " " . result.file . ";" . result.tempfile . ":" . result.line . ":" . result.col
|
||||||
" call writefile(getline(1, '$'), result.tempfile)
|
|
||||||
" endif
|
|
||||||
" let nimcom = completion . " " . file . (a:useTempFile ? (";" . result.tempfile) : "") . ":" . line . ":" . col
|
|
||||||
|
|
||||||
let query = a:command . " " . result.file . ":" . result.line . ":" . result.col
|
|
||||||
|
|
||||||
if !result.isAsync
|
if !result.isAsync
|
||||||
let jobcmdstr = g:nvim_nim_exec_nimsuggest . " " . (a:useV2 ? '--v2' : '') . " " . '--stdin' . " " . result.file
|
let jobcmdstr = g:nvim_nim_exec_nimsuggest . " " . (a:useV2 ? '--v2' : '') . " " . '--stdin' . " " . result.file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue