Skip to content
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

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

Open
sedrubal opened this issue Feb 6, 2019 · 0 comments
Open

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

sedrubal opened this issue Feb 6, 2019 · 0 comments

Comments

@sedrubal
Copy link

sedrubal commented Feb 6, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant