" slimv.vim: The Superior Lisp Interaction Mode for VIM
-" Last Change: 1
0 Dec 2012
+" Last Change: 1 Dec 2012
" Maintainer: Tamas Kovacs <kovisoft at gmail dot com>
" License: This file is placed in the public domain.
" No warranty, express or implied.
+ " Save current buffer and window in case a swank command causes a buffer change
let msg = SlimvCommandGetResponse( ':simple-completions', 'python swank_completions("' . a:base . '")', 0 )
let msg = SlimvCommandGetResponse( ':fuzzy-completions', 'python swank_fuzzy_completions("' . a:base . '")', 0 )
+ " Restore window and buffer, because it is not allowed to change buffer here
+ if win >= 0 && winnr() != win
+ execute win . "wincmd w"
" We have a completion list from SWANK
let res = split( msg, '\n' )