Lech Lorens wrote
> The attached patch makes the quickfix / location list window's title
> reflect the command that yielded the error list.
>
> Additionally, two commands have been added:
> :cse[ttitle]
> :lse[ttitle]
>
> The former allows for setting a custom title of the quickfix window. The
> latter changes the title of the location list window.
>
> An example can be found here:
> http://i41.tinypic.com/nd8obr.png
>
> The patch was made against Vim 7.2.147.
Thanks Lech. I tried it. It works well and I find it useful.
Some remarks (besides what Andreas already mentioned):
1/ The code contains several calls to STRNCPY(...).
It would be better I think to replace them with
vim_strncpy(...) to guarantee that the string is
always NUL terminated:
For example, in buffer.c:2560:
STRNCPY(NameBuff, bname, MAXPATHL);
... could be written safer as:
vim_strncpy(NameBuff, bname, MAXPATHL - 1);
2/ I see several times things like this:
if (bname)
vim_free(bname);
The test for NULL pointer can safely be removed, i.e. just write:
vim_free(bname);
... since vim_free(...) takes care of testing for NULL pointer.
Even standard C function free() do nothing if pointer is NULL
by the way (at least on Linux, not sure how portable this is).
Quoting "man 3 free":
"If ptr is NULL, no operation is performed."
I'll keep testing when I have more time, but so far it works fine.
Thanks
-- Dominique
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---