On 14-Apr-2009 Tony Mechelynck <antoine.mechely...@gmail.com> wrote: > Why do you think it's impossible to define quickfix folding in > vimscript? IMHO, a "reasonable" folding scheme would be to fold qf lines > together if they refer to errors/matches in the same source file. I > don't think that would be hard to implement in vimscript, with a > well-crafted "expression" folding method.
I bet it is possible to conceive a better way of folding for the quickfix window. But before someone figures out what the perfect way is I say: let's fix the current behaviour, which is wrong. While manual folding method is not perfect, it has the advantage of not being wrong, I believe. > As for the command-line window, that's even simpler: I believe it > deserves no folding at all. Agreed. My apologies for having neglected this case. The attached patch fixes my omission. > Also, moving everything to C code means harder to debug, harder to > change, True - but this type of window is specially handled in the C code anyway. > and practically impossible to customize. This is not the case, obviously. > I'm in favour of having the maximum possible in vimscript, and only > move to C code what cannot be done in vimscript, or only at an > unacceptable performance loss. In this case it would mean that Vim devoid of its configuration scripts would default to behaviour that is incorrect. OK, this is a minor issue which has probably never bothered anyone before, but still - why not fix it? -- Cheers, Lech --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
diff --git a/src/ex_getln.c b/src/ex_getln.c index 3f1ea71..5386ee4 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6072,6 +6072,7 @@ ex_window() (void)setfname(curbuf, (char_u *)"[Command Line]", NULL, TRUE); set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); set_option_value((char_u *)"swf", 0L, NULL, OPT_LOCAL); + set_option_value((char_u *)"fen", 0L, NULL, OPT_LOCAL); curbuf->b_p_ma = TRUE; # ifdef FEAT_RIGHTLEFT curwin->w_p_rl = cmdmsg_rl; diff --git a/src/quickfix.c b/src/quickfix.c index ee84160..ef0ae84 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2347,6 +2347,7 @@ ex_copen(eap) OPT_LOCAL); set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL); set_option_value((char_u *)"diff", 0L, NULL, OPT_LOCAL); + set_option_value((char_u *)"fdm", 0L, "manual", OPT_LOCAL); } /* Only set the height when still in the same tab page and there is no