File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,14 +146,18 @@ let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< tags< kp<"
146146 \. " | if exists('&ofu') && has('ruby') | setl ofu< | endif"
147147 \. " | if has('balloon_eval') && exists('+bexpr') | setl bexpr< | endif"
148148
149- function ! s: silmap (mode , map ) abort
149+ function ! s: map (mode , flags , map ) abort
150150 let from = matchstr (a: map , ' \S\+' )
151- if empty (maparg (from, a: mode ))
152- exe a: mode .' noremap <silent>< buffer><script> ' a: map
153- let b: undo_ftplugin .= ' | ' .a: mode .' unmap <buffer> ' .from
151+ if empty (mapcheck (from, a: mode ))
152+ exe a: mode .' map ' ' < buffer>' .( a: 0 ? a: 1 : ' ' ) a: map
153+ let b: undo_ftplugin .= ' |sil! ' .a: mode .' unmap <buffer> ' .from
154154 endif
155155endfunction
156156
157+ function ! s: silmap (mode , map ) abort
158+ call s: map (a: mode , ' <silent><script>' , a: map )
159+ endfunction
160+
157161if ! exists (" g:no_plugin_maps" ) && ! exists (" g:no_ruby_maps" )
158162 nnoremap <silent> <buffer> [m :<C-U> call <SID> searchsyn('\<def\> ','rubyDefine','b','n')<CR>
159163 nnoremap <silent> <buffer> ]m :<C-U> call <SID> searchsyn('\<def\> ','rubyDefine','','n')<CR>
You can’t perform that action at this time.
0 commit comments