Skip to content

Commit

Permalink
Fix bug in C-L mapping
Browse files Browse the repository at this point in the history
The <C-R> should be <C-R>=, otherwise an error occurs when pressing C-L:
E492: Not an editor command: nohlsearchas('diff')?'|diffupdate':''
  • Loading branch information
schachmat authored and tpope committed Sep 24, 2015
1 parent 027b239 commit 26f8783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/sensible.vim
Expand Up @@ -30,7 +30,7 @@ set ttimeoutlen=100
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<C-R>has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif

set laststatus=2
Expand Down

0 comments on commit 26f8783

Please sign in to comment.