Skip to content

Commit

Permalink
Add mode specifier to hasmapto checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kotarak committed Jun 22, 2011
1 parent 95ea7ea commit f321d5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vim/autoload/vimclojure.vim
Expand Up @@ -172,7 +172,7 @@ function! vimclojure#MakeCommandPlug(mode, plug, f, args)
endfunction

function! vimclojure#MapPlug(mode, keys, plug)
if !hasmapto("<Plug>Clojure" . a:plug)
if !hasmapto("<Plug>Clojure" . a:plug, a:mode)
execute a:mode . "map <buffer> <unique> <silent> <LocalLeader>" . a:keys
\ . " <Plug>Clojure" . a:plug
endif
Expand Down Expand Up @@ -734,19 +734,19 @@ function! vimclojure#Repl.Init(namespace) dict
set filetype=clojure
let b:vimclojure_namespace = a:namespace

if !hasmapto("<Plug>ClojureReplEnterHook")
if !hasmapto("<Plug>ClojureReplEnterHook", "i")
imap <buffer> <silent> <CR> <Plug>ClojureReplEnterHook
endif
if !hasmapto("<Plug>ClojureReplEvaluate")
if !hasmapto("<Plug>ClojureReplEvaluate", "i")
imap <buffer> <silent> <C-CR> <Plug>ClojureReplEvaluate
endif
if !hasmapto("<Plug>ClojureReplHatHook")
if !hasmapto("<Plug>ClojureReplHatHook", "n")
nmap <buffer> <silent> ^ <Plug>ClojureReplHatHook
endif
if !hasmapto("<Plug>ClojureReplUpHistory")
if !hasmapto("<Plug>ClojureReplUpHistory", "i")
imap <buffer> <silent> <C-Up> <Plug>ClojureReplUpHistory
endif
if !hasmapto("<Plug>ClojureReplDownHistory")
if !hasmapto("<Plug>ClojureReplDownHistory", "i")
imap <buffer> <silent> <C-Down> <Plug>ClojureReplDownHistory
endif

Expand Down

0 comments on commit f321d5f

Please sign in to comment.