bogado / file-line

Plugin for vim to enabling opening a file in a given line
http://www.vim.org/scripts/script.php?script_id=2184
299 stars 61 forks source link

Opening a file read-only, that is already opened, breaks #74

Open sedrubal opened 5 years ago

sedrubal commented 5 years ago

When opening a file, that is already opened with another instance of (neo-)vim, you usually see this error message:

E325: ATTENTION
Found a swap file by the name ...

Then you have the choices:

[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: 

When you choose [O]pen Read-Only or (R)ecover, you see this error message:

Error detected while processing function <SNR>71_startup:
line    7:

...which seems to belong to the exec call in s:startup function:

https://github.com/bogado/file-line/blob/559088afaf10124ea663ee0f4f73b1de48fb1632/plugin/file_line.vim#L76-L88

I have no glue, what the function does, but (argidx+1).'argument' seems to be 1argument at this point.