Skip to content
Myr

[vim] Output of chcp was not parsed correctly

Before adoption: this commit came in with the history the project adopted, so no landing records it.

By @gh4w and @janlazo See https://github.com/junegunn/vim-plug/commit/68b31a4a66ec945ff299db25a8a6382cd48edf14

authored by Junegunn Choi · committed by Junegunn Choi · parent a5a97be · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:plugin/fzf.vim+2 added-2 removed
48 unmodified lines
4950 " Use utf-8 for fzf.vim commands51 " Return array of shell commands for cmd.exe52 function! s:wrap_cmds(cmds)53 return map(['@echo off', 'for /f "tokens=4" %%a in (''chcp'') do set origchcp=%%a', 'chcp 65001 > nul'] +53 return map(['@echo off', 'setlocal enabledelayedexpansion', 'for /f "delims=: tokens=2" %%a in (''chcp'') do set origchcp=%%a', 'set origchcp=!origchcp: =!', 'chcp 65001 > nul'] +54 \ (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) +55 \ ['chcp %origchcp% > nul'], 'v:val."\r"')55 \ ['chcp !origchcp! > nul', 'setlocal disabledelayedexpansion'], 'v:val."\r"')56 endfunction57else58 let s:term_marker = ";#FZF"59
754 unmodified lines