chrisbra/NrrwRgn

Error with NR!

SirCorion opened this issue · 2 comments

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.

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

Thanks! It solves the problem.

Cheers!