### Steps to reproduce 0. `:set splitkeep=screen` 1. Set up an autocommand like `au FileType qf exe "resize" line('$')` 2. Use vim-fugitive's `:Ggrep` to search for something 3. Open the quickfix window with `:cw` 4. Use `:Ggrep` again At this point I get a > E315: ml_get: Invalid lnum: 1 for some line number that corresponds to the previously active quickfix item. ### Expected behaviour New grep results replace old ones, quickfix is resized ### Version of Vim 9.0.662 ### Environment OS: Ubuntu 22.04 LTS Terminal: gnome-terminal TERM: xterm-256color shell: bash ### Logs and stack traces ```shell Error detected while processing function fugitive#GrepCommand[1]..fugitive#Command[77]..function fugitive#GrepCommand[1]..fugitive#Command[7 0]..<SNR>215_GrepSubcommand[52]..<SNR>215_QuickfixCreate[2]..<SNR>215_QuickfixSet[2]..FileType Autocommands for "*"..function <SNR>30_LoadFT Plugin[18]..script /home/mg/.vim/ftplugin/qf.vim: line 31: E315: ml_get: Invalid lnum: 4 ``` Line 31 of https://github.com/mgedmin/dotvim/blob/master/ftplugin/qf.vim#L31 is > exe "resize" line('$') vim-fugitive's `s:QuickfixSet` is doing a `call('setqflist', [], ' ', {'title': ':Ggrep ...'})` I was so far unable to reproduce the issue with `vim --clean` after setting up autocommands and invoking `call setqflist()`.