Skip to content

Commit

Permalink
make :NRP work as documented
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Sep 26, 2014
1 parent 08c3b8c commit fb2c6aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions autoload/nrrwrgn.vim
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,10 @@ fun! nrrwrgn#NrrwRgn(mode, ...) range "{{{1
" restore settings
let &lz = o_lz
endfun
fun! nrrwrgn#Prepare() "{{{1
if !exists("s:nrrw_rgn_line") | let s:nrrw_rgn_line=[] | endif
fun! nrrwrgn#Prepare(bang) "{{{1
if !exists("s:nrrw_rgn_line") || !empty(a:bang)
let s:nrrw_rgn_line=[]
endif
call add(s:nrrw_rgn_line, line('.'))
endfun

Expand Down
1 change: 1 addition & 0 deletions doc/NarrowRegion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ looking at my Amazon whishlist: http://www.amazon.de/wishlist/2BKAHE8J7Z6UW
aleprovencio https://github.com/chrisbra/NrrwRgn/issues/30, thanks!)
- error when calling Incr Function, Make it override over global mapping.
(issue #31, reported by zc he https://github.com/chrisbra/NrrwRgn/issues/31, thanks!)
- |:NRP| didn't work as documented (reported by David Fishburn, thanks!)

0.32 Mar 27, 2014 {{{1
- hooks could corrupt the narrowed buffer, if it wasn't closed (reported by
Expand Down
2 changes: 1 addition & 1 deletion plugin/NrrwRgn.vim
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ com! -bang NRLast :NRL

" Define the actual Commands "{{{2
com! -range -bang NR :<line1>, <line2>call nrrwrgn#NrrwRgn('',<q-bang>)
com! -range NRP :exe ":" . <line1> . ',' . <line2> . 'call nrrwrgn#Prepare()'
com! -range -bang NRP :exe ":" . <line1> . ',' . <line2> . 'call nrrwrgn#Prepare(<q-bang>)'
com! -bang -range NRV :call nrrwrgn#NrrwRgn(visualmode(), <q-bang>)
com! NUD :call nrrwrgn#UnifiedDiff()
com! -bang NW :exe ":" . line('w0') . ',' . line('w$') . "call nrrwrgn#NrrwRgn(0,<q-bang>)"
Expand Down

0 comments on commit fb2c6aa

Please sign in to comment.