Skip to content

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

@sedrubal

Description

@sedrubal

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:

function! s:startup()
autocmd BufNewFile * nested call s:gotoline()
autocmd BufRead * nested call s:gotoline()
if argc() > 0
let argidx=argidx()
silent call s:handle_arg()
exec (argidx+1).'argument'
" Manually call Syntax autocommands, ignored by `:argdo`.
doautocmd Syntax
doautocmd FileType
endif
endfunction

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions