Skip to content

Commit

Permalink
do not move in wrong window (fixes #42)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Mar 29, 2015
1 parent 22e6320 commit 8448dad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 2 additions & 10 deletions autoload/nrrwrgn.vim
Expand Up @@ -15,7 +15,7 @@
" Functions:

let s:numeric_sort = v:version > 704 || v:version == 704 && has("patch341")
let s:window_type = { "source": 0, "target": 1}
let s:window_type = {"source": 0, "target": 1}

fun! <sid>WarningMsg(msg) abort "{{{1
let msg = "NarrowRegion: ". a:msg
Expand Down Expand Up @@ -384,15 +384,7 @@ fun! <sid>NrrwRgnAuCmd(instn) abort "{{{1
" Skip to original window and remove highlighting
call <sid>GoToWindow(buf, a:instn, s:window_type["source"])
call <sid>DeleteMatches(a:instn)
if has_key(w:, 'nrrw_rgn_id')
unlet! w:nrrw_rgn_id
endif
if has_key(w:, 'nrrw_rgn_id_type')
unlet! w:nrrw_rgn_id_type
endif
if winnr('$') > 1
noa wincmd p
endif
unlet! w:nrrw_rgn_id w:nrrw_rgn_id_type
call <sid>CleanUpInstn(a:instn)
endif
endif
Expand Down
3 changes: 3 additions & 0 deletions doc/NarrowRegion.txt
Expand Up @@ -474,6 +474,9 @@ looking at my Amazon whishlist: http://www.amazon.de/wishlist/2BKAHE8J7Z6UW
- Do not resize window, if :NR! was used (patch by leonidborisenko from
https://github.com/chrisbra/NrrwRgn/pull/38 thanks!)
- Various improvements for Window resizing, partly by Yclept Nemo, thanks!
- Fixed error for undefined function and cursor movement in wrong window
(issue https://github.com/chrisbra/NrrwRgn/issues/42 reported by adelarsq,
thanks!)

0.33: Jan 16, 2015 {{{1
- set local options later, so that FileType autocommands don't trigger to
Expand Down

0 comments on commit 8448dad

Please sign in to comment.