Skip to content

Commit

Permalink
Merge pull request #454 from williamjameshandley/tmux_dont_split_surr…
Browse files Browse the repository at this point in the history
…ogates

Improve handling of multibyte characters in tmux target for vim-slime
  • Loading branch information
jpalardy authored Feb 3, 2025
2 parents 5280fdf + f7f324b commit 9bc2e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/slime/targets/tmux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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"]])
Expand Down

0 comments on commit 9bc2e13

Please sign in to comment.