Skip to content

Commit

Permalink
fix: Fix eval_in_context to check input result
Browse files Browse the repository at this point in the history
cf. #434
  • Loading branch information
liquidz committed Aug 24, 2022
1 parent 9ef5dfe commit 1c4545c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/iced/operation.vim
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ endfunction
let s:last_context = ''
function! iced#operation#eval_in_context(type) abort
call inputsave()
let s:last_context = iced#system#get('io').input(iced#message#get('evaluation_context'), s:last_context)
let context = iced#system#get('io').input(iced#message#get('evaluation_context'), s:last_context)
call inputrestore()
if empty(context) | return | endif

let s:last_context = context
return s:eval({code -> iced#repl#execute('eval_code', printf('(clojure.core/let [%s] %s)', s:last_context, code))})
endfunction

Expand Down

0 comments on commit 1c4545c

Please sign in to comment.