diff --git a/autoload/slime/targets/tmux.vim b/autoload/slime/targets/tmux.vim index 1a9b27d..91b8313 100644 --- a/autoload/slime/targets/tmux.vim +++ b/autoload/slime/targets/tmux.vim @@ -24,8 +24,8 @@ function! slime#targets#tmux#send(config, text) " reasonable hardcode, will become config if needed let chunk_size = 1000 - for i in range(0, len(text_to_paste) / chunk_size) - let chunk = text_to_paste[i * chunk_size : (i + 1) * chunk_size - 1] + for i in range(0, strchars(text_to_paste) / chunk_size) + let chunk = strcharpart(text_to_paste, i * chunk_size, chunk_size) call slime#common#system(target_cmd . " load-buffer -", [], chunk) if bracketed_paste call slime#common#system(target_cmd . " paste-buffer -d -p -t %s", [a:config["target_pane"]])