onedark.vim icon indicating copy to clipboard operation
onedark.vim copied to clipboard

Weird behavior with modified file name's color in airline by opening .vim files

Open mnpqraven opened this issue 2 years ago • 1 comments

Terminal Emulator Info

Terminal emulator(s) and their version(s) used, if applicable: alacritty 0.10.1

nvim --version

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

minimal .vimrc

call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'joshdick/onedark.vim'
call plug#end()
filetype plugin indent on

set completeopt=menuone,menu
let g:airline_theme='onedark'

Issue Description

I've encountered weird behaviors with how the color of the file name in Airline is changed depending on if the file being opened is a .vim file or not

expected behavior

  • open any file, change the file's content
    • filename turns to yellow https://imgur.com/vMKLtaG.png

actual behavior/replication

  • open any .vim file, change the content
    • filename turns to yellow (as expected)
  • open any file that's not .vim, change the content
    • filename's color doesn't change
    • :AirlineRefresh doesn't have any effect until i open a vim file with :e anyname.vim and :AirlineRefresh. Then do i get the correct modified filename's color for every files https://imgur.com/KP7K2To.png
  • open any .vim file, then open any non .vim file (:e name.sh), change either content
    • modified non .vim file changes color
  • open any non .vim file, change the content
    • modified non .vim file doesn't changes color

mnpqraven avatar Jul 05 '22 11:07 mnpqraven

Have you had this issue with any other colorschemes?

onedark.vim has no special interaction with airline aside from setting global variables for its theme colors (nothing conditional based on file extensions, etc...), so I can't tell whether the issue is a onedark.vim issue or an airline one.

joshdick avatar Jul 18 '22 00:07 joshdick