2018-05-24 0:53 GMT+03:00 Jason Franklin <jrfrank...@georgiasouthern.edu>:
> The first instance makes sense.   After all, no one would want to change the
> file name in the command line window.
>
> The second instance means that I can't run :file in the ftplugin for the "qf"
> file type.  I was previously doing this in my own "ftplugin/qf.vim" script to
> get the type of list I was dealing with (the :file command output can be
> redirected to extract this).
>
> Patch 8.0.0677 means I can't do this anymore... "curbuf_lock" is set before 
> the
> qf filetype is set, which stops me from running it in that ftplugin script.
>
> See the following link for when this was introduced:
>
> https://github.com/vim/vim/blame/6053f2d29a979ffed1fe01b0a2f28e23750530e9/src/quickfix.c#L4029
>
> Like I said in my follow-up post, I read further and decided this wasn't any
> kind of bug, just a decision.  The command:
>
>   execute "normal! \<C-G>"
>
> works find for me.
>
> ZyX, to answer your question: I was using ":file" in my "ftplugin/qf.vim"
> script in the following manner:
>
>     if !exists('*s:SetErrorListType')
>         function s:SetErrorListType()
>             redir => l:bufferInfo
>             file
>             redir END
>
>             if l:bufferInfo =~ 'Quickfix List'
>                 let b:err_list_type = 'quickfix'
>             else
>                 let b:err_list_type = 'location'
>             endif
>         endfunction
>     endif
>
>     silent call s:SetErrorListType()
>
> It gives me an indicator of what type of list this window holds.

Current Vim has this data in `getwininfo()` return value. Unless you
aim for older versions which did not have this kind of capability you
should be using it. (Also to make solution more universal it is good
idea to first set and restore language via `:lang` because “Quickfix
List” string is translated.)

>
> --
> --
> 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 vim_dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui