New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with NR! #33

Closed
SirCorion opened this Issue Dec 3, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@SirCorion

SirCorion commented Dec 3, 2014

I have a following bug using the NR! command.

E37: No write since last change
E162: No write since last change for buffer "test.py"
Error detected while processing function <SNR>88_WriteNrrwRgn..<SNR>88_NrrwRgnAuCmd:
line   44:
E716: Key not present in Dictionary: winnr "wincmd w"
E15: Invalid expression: s:nrrw_rgn_lines[a:instn].winnr "wincmd w"
Press ENTER or type command to continue

Steps to reproduce:

  1. Open a file
  2. Select a range of text in the VISUAL mode
  3. :NR! and a following message appears: "NrrwRgn_1" [Not edited] --No lines in buffer--
  4. Make changes in the NrrwRgn
  5. :wq
  6. The changes from NrrwRgn are applied to the file, but the error message appears.

The :NR (no exclamation mark) command works fine.

@chrisbra chrisbra closed this in a84b3e8 Dec 3, 2014

@chrisbra

This comment has been minimized.

Show comment
Hide comment
@chrisbra

chrisbra Dec 3, 2014

Owner

Hi SirCorion!

On Mi, 03 Dez 2014, SirCorion wrote:

I have a following bug using the NR! command.

E37: No write since last change
E162: No write since last change for buffer "test.py"
Error detected while processing function <SNR>88_WriteNrrwRgn..<SNR>88_NrrwRgnAuCmd:
line   44:
E716: Key not present in Dictionary: winnr "wincmd w"
E15: Invalid expression: s:nrrw_rgn_lines[a:instn].winnr "wincmd w"
Press ENTER or type command to continue

Steps to reproduce:

  1. Open a file
  2. Select a range of text in the VISUAL mode
  3. :NR! and a following message appears: "NrrwRgn_1" [Not edited] --No lines in buffer--
  4. Make changes in the NrrwRgn
  5. :wq
  6. The changes from NrrwRgn are applied to the file, but the error message appears.

The :NR (no exclamation mark) command works fine.

Thanks for the nice example. Fixed it and pushed a fix.

Best,

Christian

Das beste an modernen Schlagern ist, daß sie nicht lange modern
bleiben.
-- Kees Snyder

Owner

chrisbra commented Dec 3, 2014

Hi SirCorion!

On Mi, 03 Dez 2014, SirCorion wrote:

I have a following bug using the NR! command.

E37: No write since last change
E162: No write since last change for buffer "test.py"
Error detected while processing function <SNR>88_WriteNrrwRgn..<SNR>88_NrrwRgnAuCmd:
line   44:
E716: Key not present in Dictionary: winnr "wincmd w"
E15: Invalid expression: s:nrrw_rgn_lines[a:instn].winnr "wincmd w"
Press ENTER or type command to continue

Steps to reproduce:

  1. Open a file
  2. Select a range of text in the VISUAL mode
  3. :NR! and a following message appears: "NrrwRgn_1" [Not edited] --No lines in buffer--
  4. Make changes in the NrrwRgn
  5. :wq
  6. The changes from NrrwRgn are applied to the file, but the error message appears.

The :NR (no exclamation mark) command works fine.

Thanks for the nice example. Fixed it and pushed a fix.

Best,

Christian

Das beste an modernen Schlagern ist, daß sie nicht lange modern
bleiben.
-- Kees Snyder

@SirCorion

This comment has been minimized.

Show comment
Hide comment
@SirCorion

SirCorion Dec 3, 2014

Thanks! It solves the problem.

Cheers!

SirCorion commented Dec 3, 2014

Thanks! It solves the problem.

Cheers!

vim-scripts added a commit to vim-scripts/NrrwRgn that referenced this issue Jan 16, 2015

Version 33
- set local options later, so that FileType autocommands don't trigger to early- make sure, shortening the buffer name handles multibyte characters correctly.- new public function nrrwrgn#NrrwRgnStatus()- <Leader>nr also mapped as operator function (so the region over which you move will be opened in the narrowed window- highlighting wrong when char-selecting within a line- needs Vim 7.4- mention how to abort the narrowed window (suggested by David Fishburn, thanks!)- Execute hooks after the options for the narrowed window have been set (issue #29, reported by fmorales, thanks!)- <Leader><Space> Toggles the Narrowed Window Size (idea by David Fishburn, thanks!)- New hook b:nrrw_aucmd_written, to be executed, whenever the narrowed info has been written back into the original buffer.- g:nrrw_rgn_write_on_sync is being deprecated in favor of using the newly written hook- error on writing back multi narrowed window (issue #30, reported by aleprovencio chrisbra/NrrwRgn#30, thanks!)- error when calling Incr Function, Make it override over global mapping. (issue #31, reported by zc he chrisbra/NrrwRgn#31, thanks!)- |:NRP| didn't work as documented (reported by David Fishburn, thanks!)- fix small syntax error in autoload file (issue #32, reported by itchyny (chrisbra/NrrwRgn#32, thanks!)- check, that dict key is available before accessing it (issue #33, reported by SirCorion (chrisbra/NrrwRgn#33, thanks!)(automatically uploaded)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment