diff options
| -rw-r--r-- | bundle/insert-layout/plugin/insert_layout.vim | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/bundle/insert-layout/plugin/insert_layout.vim b/bundle/insert-layout/plugin/insert_layout.vim index f5b93d3..9213dec 100644 --- a/bundle/insert-layout/plugin/insert_layout.vim +++ b/bundle/insert-layout/plugin/insert_layout.vim @@ -14,7 +14,7 @@ const layout_names = {  var normal_layout: string -def IsLayoutSwitcherAvailable(): bool +def IsLayoutSwitcherAvailable(): number  	return executable('xkbswitch')  enddef @@ -55,6 +55,11 @@ def InsertLayoutOff(): void  enddef  def InsertLayoutOn(layout: string): void +	if !IsLayoutSwitcherAvailable() +		echoerr "'xkbswitch' command not found" +		return +	endif +  	# autocmd insert_layout InsertEnter <buffer> OnInsertEnter(layout)  	# autocmd insert_layout InsertLeave <buffer> OnInsertLeave()  	autocmd_add([ | 
