Hi Bram,

On Sun, Sep 13, 2020 at 4:42 AM Bram Moolenaar <[email protected]>
wrote:

> Can you turn the example into a test? I gave it a try but it didn't
> trigger the error.
>
>
>
I am able to reproduce this error with the following function:

===============================================
func Test()
  call writefile(['test1', 'test2'], 'Xfile')
  edit Xfile
  let s:bufnr = bufnr()
  call setloclist(1, [{'bufnr' : s:bufnr, 'lnum' : 1, 'text' : 'test1'},
        \ {'bufnr' : s:bufnr, 'lnum' : 2, 'text' : 'test2'}])

  augroup Test_LocList
    au!
    autocmd BufEnter * call setloclist(1,
          \ [{'bufnr' : s:bufnr, 'lnum' : 1, 'text' : 'test1'},
          \  {'bufnr' : s:bufnr, 'lnum' : 2, 'text' : 'test2'}], 'r')
  augroup END

  lopen
  exe "normal j\<CR>"

  augroup Test_LocList
    au!
  augroup END
  call delete('Xfile')
endfunc
===============================================

- Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7kB2DMByL8CFcSWp-wg_vL2Tdxc2ypOEEhE-zUq4it7bg%40mail.gmail.com.

Raspunde prin e-mail lui