Skip to content

Commit 33f7ca9

Browse files
p1xelHer0parsonsmatt
authored andcommitted
send C-u to the REPL before running InteroReload (parsonsmatt#148)
1 parent c7f1e0b commit 33f7ca9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

autoload/intero/repl.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,19 @@ function! intero#repl#reload() abort
173173
" Truncate file, so that we don't show stale results while recompiling
174174
call intero#maker#write_update([])
175175

176+
call intero#repl#clear()
176177
call intero#repl#send(':reload')
177178
endif
178179
endfunction
179180

181+
function! intero#repl#clear() abort
182+
if !exists('g:intero_buffer_id')
183+
echomsg 'Intero not running.'
184+
return
185+
endif
186+
call jobsend(g:intero_job_id, "\<C-u>")
187+
endfunction
188+
180189
function! intero#repl#uses() abort
181190
if !g:intero_started
182191
echoerr 'Intero is still starting up'

0 commit comments

Comments
 (0)