diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
| commit | c324271b99eee4c621463f368914d57cd729bd9c (patch) | |
| tree | 5d979d333a2d5f9c080991d5482fd5916f8579c6 /runtime/ftplugin/qf.vim | |
| parent | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (diff) | |
| parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
| download | rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.gz rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.bz2 rneovim-c324271b99eee4c621463f368914d57cd729bd9c.zip | |
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'runtime/ftplugin/qf.vim')
| -rw-r--r-- | runtime/ftplugin/qf.vim | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/runtime/ftplugin/qf.vim b/runtime/ftplugin/qf.vim index a3dfce0e76..85fb9f6125 100644 --- a/runtime/ftplugin/qf.vim +++ b/runtime/ftplugin/qf.vim @@ -16,26 +16,3 @@ if !get(g:, 'qf_disable_statusline') " Display the command that produced the list in the quickfix window: setlocal stl=%t%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}\ %=%-15(%l,%c%V%)\ %P endif - -function! s:setup_toc() abort - if get(w:, 'quickfix_title') !~# '\<TOC$' || &syntax != 'qf' - return - endif - - let list = getloclist(0) - if empty(list) - return - endif - - let bufnr = list[0].bufnr - setlocal modifiable - silent %delete _ - call setline(1, map(list, 'v:val.text')) - setlocal nomodifiable nomodified - let &syntax = getbufvar(bufnr, '&syntax') -endfunction - -augroup qf_toc - autocmd! - autocmd Syntax <buffer> call s:setup_toc() -augroup END |