{"action":"created","issue":{"url":"https://api.github.com/repos/vim-airline/vim-airline/issues/393","labels_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/393/comments","events_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/393/events","html_url":"https://github.com/vim-airline/vim-airline/issues/393","id":24841688,"number":393,"title":"Race Condition Discovered","user":{"login":"DirectXMan12","id":119737,"avatar_url":"https://avatars.githubusercontent.com/u/119737?v=3","gravatar_id":"","url":"https://api.github.com/users/DirectXMan12","html_url":"https://github.com/DirectXMan12","followers_url":"https://api.github.com/users/DirectXMan12/followers","following_url":"https://api.github.com/users/DirectXMan12/following{/other_user}","gists_url":"https://api.github.com/users/DirectXMan12/gists{/gist_id}","starred_url":"https://api.github.com/users/DirectXMan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DirectXMan12/subscriptions","organizations_url":"https://api.github.com/users/DirectXMan12/orgs","repos_url":"https://api.github.com/users/DirectXMan12/repos","events_url":"https://api.github.com/users/DirectXMan12/events{/privacy}","received_events_url":"https://api.github.com/users/DirectXMan12/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vim-airline/vim-airline/labels/rendering","name":"rendering","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2013-12-28T05:33:33Z","updated_at":"2016-01-30T15:36:25Z","closed_at":"2016-01-30T15:36:25Z","body":"I recently installed tagbar (both it and airline are install through pathogen), and have discovered a bizarre issue.  When I have the tarbar extension for airline disabled, all is well.  However, when I enable it, the following happens:\r\n\r\n1. The follwing text (or similar) appears at the end of the current buffer (not inserted, just displayed): ```^[P1+r436f=323536^[\\^[P1+r6b75=1B4F41^[\\^[P1+r6b64=1B4F42^[\\^[P1+r6b72=1B4F43^[\\^[P1+r6b6c=1B4F44^[\\^[P1+r2332=1B5B313B3248^[\\^[P1+r2334=1B5B313B3244^[\\^[P1+r2569=1B5B313B3243^[\\^[P1+r2a37=1B5B313B3246^[\\^[P1+r6b3```\r\n\r\n2. A white-backed plain VIM status line is displayed in the second row from the botton, where airline would usually sit.\r\n\r\n3. airline is displayed on the bottom row, where a blank line would normally be displayed (where status messages display and commands show up)\r\n\r\nPressing any key clears the odd garbage text mentioned above, and also clears airline from the bottom row, so that only the white-backed plain status line is shown.\r\n\r\nResizing the window, switching buffers, etc, restores the normal airline status line.\r\n\r\nI've notice that I can cause the issue to only happen sometimes by commenting out sections of tagbar which make calls to `system`, leading me to believe that the issue was a race condition of some sort.\r\n\r\nI the figured out that the culprit line appears to be the autocommand that runs `<sid>on_window_changed()` on `VimEnter` ([plugin/airline.vim:76](https://github.com/bling/vim-airline/blob/master/plugin/airline.vim#L76)).  The actual culprit command ended up being the call to `setwinvar` in `s:invoke_funcrefs` which sets the status line ([autoload/airline.vim:118](https://github.com/bling/vim-airline/blob/master/autoload/airline.vim#L118)).  However, at this point I'm a bit stumped as to what's actually causing the issue.\r\n\r\nI can \"fix\" the issue by removing the `VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,` from the `autocmd` call, but then something flashes where the status line should be briefly before airline shows, which is really annoying.\r\n\r\n```\r\n:version\r\nVIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 27 2013 22:49:32)\r\nIncluded patches: 1-94\r\nModified by Gentoo-7.4.94\r\nCompiled by directxman12@sross\r\nHuge version without GUI.  Features included (+) or not (-):\r\n+acl             +clientserver    +cscope          +emacs_tags      +folding         +keymap          +menu            +mouse_netterm   +netbeans_intg   -python3         -sniff           -tcl             +virtualedit     +writebackup\r\n+arabic          +clipboard       +cursorbind      +eval            -footer          +langmap         +mksession       +mouse_sgr       +path_extra      +quickfix        +startuptime     +terminfo        +visual          +X11\r\n+autocmd         +cmdline_compl   +cursorshape     +ex_extra        +fork()          +libcall         +modify_fname    -mouse_sysmouse  +perl            +reltime         +statusline      +termresponse    +visualextra     +xfontset\r\n-balloon_eval    +cmdline_hist    +dialog_con      +extra_search    +gettext         +linebreak       +mouse           +mouse_urxvt     +persistent_undo +rightleft       -sun_workshop    +textobjects     +viminfo         -xim\r\n-browse          +cmdline_info    +diff            +farsi           -hangul_input    +lispindent      -mouseshape      +mouse_xterm     +postscript      +ruby            +syntax          +title           +vreplace        +xsmp_interact\r\n++builtin_terms  +comments        +digraphs        +file_in_path    +iconv           +listcmds        +mouse_dec       +multi_byte      +printer         +scrollbind      +tag_binary      -toolbar         +wildignore      +xterm_clipboard\r\n+byte_offset     +conceal         -dnd             +find_in_path    +insert_expand   +localmap        -mouse_gpm       +multi_lang      +profile         +signs           +tag_old_static  +user_commands   +wildmenu        -xterm_save\r\n+cindent         +cryptv          -ebcdic          +float           +jumplist        -lua             -mouse_jsbterm   -mzscheme        +python          +smartindent     -tag_any_white   +vertsplit       +windows         -xpm\r\n   system vimrc file: \"/etc/vim/vimrc\"\r\n     user vimrc file: \"$HOME/.vimrc\"\r\n 2nd user vimrc file: \"~/.vim/vimrc\"\r\n      user exrc file: \"$HOME/.exrc\"\r\n  fall-back for $VIM: \"/usr/share/vim\"\r\nCompilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -pipe -march=corei7-avx -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1\r\nLinking: x86_64-pc-linux-gnu-gcc   -L. -Wl,-O1 -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -Wl,-E  -Wl,-O1 -L/usr/local/lib -Wl,--as-needed -o vim    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -lncurses -lelf -lnsl   -lacl -l\r\nattr -ldl   -Wl,-E -Wl,-O1 -Wl,--as-needed  -L/usr/lib64/perl5/5.12.4/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc -L/usr/lib64/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic   -Wl,-R -Wl,/usr\r\n/lib64 -L/usr/lib64 -lruby19 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib64```\r\n"},"comment":{"url":"https://api.github.com/repos/vim-airline/vim-airline/issues/comments/177211508","html_url":"https://github.com/vim-airline/vim-airline/issues/393#issuecomment-177211508","issue_url":"https://api.github.com/repos/vim-airline/vim-airline/issues/393","id":177211508,"user":{"login":"chrisbra","id":244927,"avatar_url":"https://avatars.githubusercontent.com/u/244927?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbra","html_url":"https://github.com/chrisbra","followers_url":"https://api.github.com/users/chrisbra/followers","following_url":"https://api.github.com/users/chrisbra/following{/other_user}","gists_url":"https://api.github.com/users/chrisbra/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbra/subscriptions","organizations_url":"https://api.github.com/users/chrisbra/orgs","repos_url":"https://api.github.com/users/chrisbra/repos","events_url":"https://api.github.com/users/chrisbra/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbra/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T15:36:25Z","updated_at":"2016-01-30T15:36:25Z","body":"Okay, I am closing it now."}}