mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
use tr() instead of substitute
should be a bit faster
This commit is contained in:
@@ -98,7 +98,7 @@ endfunction
|
||||
function! airline#switch_matching_theme()
|
||||
if exists('g:colors_name')
|
||||
let existing = g:airline_theme
|
||||
let theme = substitute(tolower(g:colors_name), '-', '_', 'g')
|
||||
let theme = tr(tolower(g:colors_name), '-', '_')
|
||||
try
|
||||
call airline#switch_theme(theme)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user