Wednesday, April 27, 2011

Re: quickfix window's manual fix

On Apr 27, 6:50 am, sinbad <sinbad.sin...@gmail.com> wrote:
>
> how to update the quickfix window manually.
> with cscope quickfix i searched for some
> symbol, and from the quickfix window i deleted
> some entires manually now if i press :cnext
> i want to go to (file,loc) with the updated
> quickfix results, but it seems to be going
> to the (file, loc) where manually deleted
> entries were pointing to. any clue ?
>

You cannot update the quickfix list manually with normal editing
commands in the quickfix window. This is why "nomodifiable" is set in
this buffer by default. You should not have expected it to work simply
by overriding that option, it is set for a reason. If you had read the
help, you would see the following under :help quickfix-window:

> The window will contain a special buffer, with
> 'buftype' equal to "quickfix". Don't change this!

and lower down:

> Note: Making changes in the quickfix window has no effect on the list of
> errors. 'modifiable' is off to avoid making changes. If you delete or insert
> lines anyway, the relation between the text and the error number is messed up.
> If you really want to do this, you could write the contents of the quickfix
> window to a file and use ":cfile" to have it parsed and used as the new error
> list.

What you CAN do is use the quickfix functions to modify the quickfix
list in a script. See :help quickfix-functions for a list of these
functions.

The other thing you can do is always check the :help before asking
about it if something does not work the way you'd expect.

--
You received this message from the "vim_use" 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

No comments: