chrisbra / NrrwRgn

A Narrow Region Plugin for vim (like Emacs Narrow Region)
http://www.vim.org/scripts/script.php?script_id=3075
675 stars 25 forks source link

Doesn't cleanup a narrowed region after closing the region window #47

Closed idbrii closed 9 years ago

idbrii commented 9 years ago

ae72844285663ab9fdb18498ec0dff2aabf115bd doesn't cleanup a narrowed region when using a custom map to close the region window. 762742e850c702366f13df596ffa9908bb09ecb7 does not have this problem.

(On Windows with gvim 7.4.0)

$ git clone git@github.com:chrisbra/NrrwRgn.git vimfiles
$ gvim -N +"source ~/.vim/bundle/sensible/plugin/sensible.vim" +"nnoremap <Leader>w <C-w>" ~/vimfiles/plugin/NrrwRgn.vim
vip to select the first paragraph
\nr to narrow
\wq to quit the narrowed window (because of the custom map above)

The first paragraph is still highlighted and the current window is 'notmodifiable'.

idbrii commented 9 years ago

Actually, it looks like the custom map doesn't matter. I just doesn't clean up at all.

idbrii commented 9 years ago

Git bisect says that 0c1fb1d8d489c055d81d01b1a9ba2fe6371f56fd is the bad commit.

idbrii commented 9 years ago

I don't understand the original issue in #44 since when I :b# twice, the buffer is empty on ae72844 and doesn't exist on 762742e ("Buffer 2 does not exist").

$ gvim -N +"source ~/vimarchive/.vim/bundle/sensible/plugin/sensible.vim" ~/vimfiles/plugin/NrrwRgn.vim
chrisbra commented 9 years ago

should be fixed now. Please test.

idbrii commented 9 years ago

Fixed. Thanks!