mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
runtime(go): fix b:undo_ftplugin
last `unmap` can cause the error "E31: No such mapping" when `doaudocmd FileType go` if appending other commands to `b:undo_ftplugin` i.e. the space and the next bar as `let b:undo_ftplugin .= ' | setl ...'`.
This commit is contained in:
parent
a494ce1c64
commit
c4b551e73d
@ -56,10 +56,10 @@ if !exists("no_plugin_maps") && !exists("no_go_maps")
|
||||
noremap <silent> <buffer> [[ <Cmd>call <SID>GoFindSection('prev_start', v:count1)<CR>
|
||||
noremap <silent> <buffer> [] <Cmd>call <SID>GoFindSection('prev_end', v:count1)<CR>
|
||||
let b:undo_ftplugin .= ''
|
||||
\ . '| unmap <buffer> ]]'
|
||||
\ . '| unmap <buffer> ]['
|
||||
\ . '| unmap <buffer> [['
|
||||
\ . '| unmap <buffer> []'
|
||||
\ . "| silent! exe 'unmap <buffer> ]]'"
|
||||
\ . "| silent! exe 'unmap <buffer> ]['"
|
||||
\ . "| silent! exe 'unmap <buffer> [['"
|
||||
\ . "| silent! exe 'unmap <buffer> []'"
|
||||
endif
|
||||
|
||||
function! <SID>GoFindSection(dir, count)
|
||||
|
Loading…
x
Reference in New Issue
Block a user