mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
man.vim: use 'eventignore' instead of :noautocmd #6149
We only need to ignore BufReadCmd (from runtime/plugin/man.vim). Closes #6144
This commit is contained in:

committed by
Justin M. Keyes

parent
7046b9a78d
commit
c8ee0be745
@@ -46,11 +46,17 @@ function! man#open_page(count, count1, mods, ...) abort
|
|||||||
|
|
||||||
call s:push_tag()
|
call s:push_tag()
|
||||||
let bufname = 'man://'.name.(empty(sect)?'':'('.sect.')')
|
let bufname = 'man://'.name.(empty(sect)?'':'('.sect.')')
|
||||||
if a:mods !~# 'tab' && s:find_man()
|
|
||||||
noautocmd execute 'silent edit' fnameescape(bufname)
|
try
|
||||||
else
|
set eventignore+=BufReadCmd
|
||||||
noautocmd execute 'silent' a:mods 'split' fnameescape(bufname)
|
if a:mods !~# 'tab' && s:find_man()
|
||||||
endif
|
execute 'silent edit' fnameescape(bufname)
|
||||||
|
else
|
||||||
|
execute 'silent' a:mods 'split' fnameescape(bufname)
|
||||||
|
endif
|
||||||
|
finally
|
||||||
|
set eventignore-=BufReadCmd
|
||||||
|
endtry
|
||||||
|
|
||||||
try
|
try
|
||||||
let page = s:get_page(path)
|
let page = s:get_page(path)
|
||||||
@@ -70,12 +76,13 @@ endfunction
|
|||||||
function! man#read_page(ref) abort
|
function! man#read_page(ref) abort
|
||||||
try
|
try
|
||||||
let [sect, name] = man#extract_sect_and_name_ref(a:ref)
|
let [sect, name] = man#extract_sect_and_name_ref(a:ref)
|
||||||
let [b:man_sect, name, path] = s:verify_exists(sect, name)
|
let [sect, name, path] = s:verify_exists(sect, name)
|
||||||
let page = s:get_page(path)
|
let page = s:get_page(path)
|
||||||
catch
|
catch
|
||||||
" call to s:error() is unnecessary
|
" call to s:error() is unnecessary
|
||||||
return
|
return
|
||||||
endtry
|
endtry
|
||||||
|
let b:man_sect = sect
|
||||||
call s:put_page(page)
|
call s:put_page(page)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@@ -217,6 +217,7 @@ g8 Print the hex values of the bytes used in the
|
|||||||
|
|
||||||
To enter terminal mode automatically: >
|
To enter terminal mode automatically: >
|
||||||
autocmd BufEnter term://* startinsert
|
autocmd BufEnter term://* startinsert
|
||||||
|
autocmd BufLeave term://* stopinsert
|
||||||
<
|
<
|
||||||
*:!cmd* *:!* *E34*
|
*:!cmd* *:!* *E34*
|
||||||
:!{cmd} Execute {cmd} with 'shell'. See also |:terminal|.
|
:!{cmd} Execute {cmd} with 'shell'. See also |:terminal|.
|
||||||
|
Reference in New Issue
Block a user