Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.61k stars 574 forks source link

The powerline symbols of vim-airline can't be shown in the right place when vim runs in WSL with ConEmu #1555

Open IceNature opened 6 years ago

IceNature commented 6 years ago

Versions

ConEmu build: 180506 x64 OS version: Windows 10 x64 1803 17134.48, but vim runs in WSL(OpenSUSE 42.3 Leap)

Linux LAPTOP-******** 4.4.0-17134-Microsoft #48-Microsoft Fri Apr 27 18:06:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): WSL with ZSH

Problem description

The powerline symbols and the texts of vim-airline are not shown in the right place or show the right color except the first one.

I have written a similar issue in vim-airline #1721. They said this is either a bug in WSL or in ConEmu.

Steps to reproduce

  1. Start WSL with commands
    %ConEmuDir%\ConEmu\wsl\wsl-con.cmd
  2. Compile Vim(8 1803) in WSL with configure
    ./configure --with-features=huge --enable-multibyte --disable-darwin --enable-terminal  --enable-python3interp=yes  --enable-cscope CC=clang CXX=clang++  LDFLAGS=-fuse-ld=lld -CFLAGS=-O3
  3. Install vim-airline and use the sample .vimrc in the Additional files section.

Actual results

It seems that vim and vim-airline gets the right symbols but they are not shown correctly. image1526176918_1

Expected results

I try another wsl terminal with same font. It works well as the screenshot: image1526178256_2

Additional files

I got the powerline patched font here, and set it in the ConEmu font setting: 1526117155_1

There is the sample .vimrc including configures of Vim encoding and airline:

set encoding=utf-8
set langmenu=zh_CN.UTF-8
language messages zh_CN.utf-8
set termencoding=utf-8
set nocompatible
source $VIMRUNTIME/vimrc_example.vim

colorscheme molokai
set term=xterm-256color
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
set termguicolors

let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tagbar#enabled = 1
let g:airline#extensions#tagbar#flags = 'f'
let g:airline#extensions#branch#enabled = 1
let g:airline#extensions#branch#empty_message = ''
let g:airline#extensions#branch#displayed_head_limit = 10
let g:airline_powerline_fonts = 1
let g:airline#extensions#virtualenv#enabled = 1
let g:airline#extensions#ale#enabled = 1
let g:airline_theme = 'dark'
Maximus5 commented 6 years ago

Just to be sure - does it reproduce if you run ConEmu as ConEmu64.exe -basic -run {bash}?

What is output of the command ConEmuC -CheckUnicode?

IceNature commented 6 years ago

@Maximus5 The problem still exists after I ran the ConEmu64.exe -basic -run {bash::bash} image1526208156_1 The ConEmuC -CheckUnicode in the {cmd} started with -basic outputs image1526208243_2 And the ConEmuC -CheckUnicode in the ConEmuC64.exe started by cmder outputs image1526208649_3 There is the log with the operations:

unionepro commented 5 years ago

I don't known why, but it seems that the problem disappeared after I disabled TrueMode (24bit color) support in ConEmu. 图片

图片