Skip to content

Commit

Permalink
Expose mark#mark#AnyMarkPattern()
Browse files Browse the repository at this point in the history
  • Loading branch information
inkarkat committed Mar 4, 2022
1 parent 0c4384d commit 8927403
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ https://github.com/inkarkat/vim-mark/issues or email (address below).
HISTORY
------------------------------------------------------------------------------

##### 3.2.1 RELEASEME
- Expose mark#mark#AnyMarkPattern().

##### 3.2.0 15-Feb-2022
- Add mark#GetMarkNumber(), based on feedback by Snorch in #36.
- Mark updates across windows now use win\_execute() (since Vim 8.1.1418)
Expand Down
8 changes: 4 additions & 4 deletions autoload/mark.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Script Name: mark.vim
" Description: Highlight several words in different colors simultaneously.
"
" Copyright: (C) 2008-2021 Ingo Karkat
" Copyright: (C) 2008-2022 Ingo Karkat
" (C) 2005-2008 Yuheng Xie
" The VIM LICENSE applies to this script; see ':help copyright'.
"
Expand All @@ -11,7 +11,7 @@
" - ingo-library.vim plugin
" - SearchSpecial.vim plugin (optional)
"
" Version: 3.1.1
" Version: 3.2.1

"- functions ------------------------------------------------------------------

Expand Down Expand Up @@ -744,14 +744,14 @@ function! s:Search( pattern, count, isBackward, currentMarkPosition, searchType
endfunction

" Combine all marks into one regexp.
function! s:AnyMark()
function! mark#AnyMarkPattern()
return join(filter(copy(s:pattern), '! empty(v:val)'), '\|')
endfunction

" Search any mark.
function! mark#SearchAnyMark( isBackward )
let l:markPosition = mark#CurrentMark()[1]
let l:markText = s:AnyMark()
let l:markText = mark#AnyMarkPattern()
let s:lastSearch = -1
return s:Search(l:markText, v:count1, a:isBackward, l:markPosition, 'mark*')
endfunction
Expand Down
3 changes: 3 additions & 0 deletions doc/mark.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ https://github.com/inkarkat/vim-mark/issues or email (address below).
==============================================================================
HISTORY *mark-history*

3.2.1 RELEASEME
- Expose mark#mark#AnyMarkPattern().

3.2.0 15-Feb-2022
- Add mark#GetMarkNumber(), based on feedback by Snorch in #36.
- Mark updates across windows now use win_execute() (since Vim 8.1.1418)
Expand Down

0 comments on commit 8927403

Please sign in to comment.