mirror of
https://github.com/inkarkat/vim-ingo-library.git
synced 2026-05-29 11:18:51 +02:00
Add ingo#window#quickfix#GetOtherList() variant of ingo#window#quickfix#GetList() that gets the quickfixType passed in
This commit is contained in:
@@ -153,6 +153,8 @@ HISTORY
|
||||
- ingo#selection#Get{In,Ex}clusiveEndPos(): Prevent "E951: \\% value too large"
|
||||
by checking line length. This condition typically happens with a linewise
|
||||
selection (where the column is 2147483647).
|
||||
- Add ingo#window#quickfix#GetOtherList() variant of
|
||||
ingo#window#quickfix#GetList() that gets the quickfixType passed in.
|
||||
|
||||
##### 1.040 31-Oct-2019
|
||||
- Add ingo#str#TrimTrailing() variant of ingo#str#Trim().
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" DEPENDENCIES:
|
||||
"
|
||||
" Copyright: (C) 2010-2019 Ingo Karkat
|
||||
" Copyright: (C) 2010-2020 Ingo Karkat
|
||||
" The VIM LICENSE applies to this script; see ':help copyright'.
|
||||
"
|
||||
" Maintainer: Ingo Karkat <ingo@karkat.de>
|
||||
@@ -93,6 +93,28 @@ function! ingo#window#quickfix#GetList()
|
||||
throw 'ASSERT: Invalid quickfix type: ' . l:quickfixType
|
||||
endif
|
||||
endfunction
|
||||
function! ingo#window#quickfix#GetOtherList( quickfixType ) abort
|
||||
"******************************************************************************
|
||||
"* PURPOSE:
|
||||
" Return a list with all the quickfix / location list errors.
|
||||
"* ASSUMPTIONS / PRECONDITIONS:
|
||||
" None.
|
||||
"* EFFECTS / POSTCONDITIONS:
|
||||
" None.
|
||||
"* INPUTS:
|
||||
" a:quickfixType 1 for quickfix window, 2 for the current window's location
|
||||
" list. N + 2 for window N's location list
|
||||
"* RETURN VALUES:
|
||||
" List.
|
||||
"******************************************************************************
|
||||
if a:quickfixType == 1
|
||||
return getqflist()
|
||||
elseif a:quickfixType >= 2
|
||||
return getloclist(a:quickfixType - 2)
|
||||
else
|
||||
throw 'ASSERT: Invalid quickfix type: ' . a:quickfixType
|
||||
endif
|
||||
endfunction
|
||||
function! ingo#window#quickfix#SetList( ... )
|
||||
"******************************************************************************
|
||||
"* PURPOSE:
|
||||
|
||||
@@ -168,6 +168,8 @@ HISTORY *ingo-library-history*
|
||||
- ingo#selection#Get{In,Ex}clusiveEndPos(): Prevent "E951: \% value too large"
|
||||
by checking line length. This condition typically happens with a linewise
|
||||
selection (where the column is 2147483647).
|
||||
- Add ingo#window#quickfix#GetOtherList() variant of
|
||||
ingo#window#quickfix#GetList() that gets the quickfixType passed in.
|
||||
|
||||
1.040 31-Oct-2019
|
||||
- Add ingo#str#TrimTrailing() variant of ingo#str#Trim().
|
||||
|
||||
Reference in New Issue
Block a user