Charles Campbell wrote:

> Tony Mechelynck wrote:
> > On 26/04/11 18:59, Charles Campbell wrote:
> >> Bram Moolenaar wrote:
> >>> Tony Mechelynck wrote:
> >>>
> >>>> Don't know if this has been reported yet.
> >>>>
> >>>> With the line
> >>>>
> >>>> set lines=99999 columns=99999
> >>>>
> >>>> in my vimrc, gvim crashes at GUI startup with (if there is a stderr) a
> >>>> cryptic message from X.
> >> Hello,
> >>
> >> I'm not getting a crash for some reason; although I do get odd behavior
> >> with vim (as opposed to gvim). Why not use the attached patch? I'm sure
> >> its not in the ideal location, but it enforces the max/min values for
> >> lines and columns. Does it fix the crash you're having?
> >>
> >> The odd behavior: the no-file banner is misplaced, and I can see a blue
> >> on dark blue cursor rapidly flitting down on the left hand side, but
> >> that eventually settles to the misplaced no-file banner (you know, "VIM
> >> - Vi Improved,..."). I get this odd behavior even with the maximum lines
> >> and columns (because I don't have such a huge screen, I presume), so its
> >> hard for me to test the patch.
> >>
> >> Regards,
> >> Chip Campbell
> >
> > That patch is for bufexplorer.vim, which I don't use.
> >
> > At the bash prompt, the command
> >
> >     gvim -N -u NONE --cmd 'set lines=99999 columns=99999'
> >
> > (which loads neither vimrc, gvimrc, nor plugins) is enough (on my 
> > installation) to trigger the crash ("The program 'gvim' received an X 
> > System error", etc.).
> >
> > This error is displayed before gvim forks away from the console (the 
> > new prompt appears after it, not before).
>
> Hmm, I have no idea how the wrong patch got sent; I'm trying again.  
> I've also included the text of it...
> 
> ---------------------------------------------------------------------
> *** main.c    2011-04-27 09:19:55.000000000 -0400
> --- newmain.c    2011-04-27 09:19:31.000000000 -0400
> ***************
> *** 559,564 ****
> --- 559,568 ----
> 
>        /* Source startup scripts. */
>        source_startup_scripts(&params);
> +     if(Rows < 2)     Rows    = 2;
> +     if(Rows > 1000)  Rows    = 1000;
> +     if(Columns < 12)    Columns = 12;
> +     if(Columns > 10000) Columns = 10000;
> 
>    #ifdef FEAT_EVAL
>        /*
> 
> ---------------------------------------------------------------------
> 
> The command you gave above causes my centos system no trouble; in fact, 
> the "VIM - Vi IMproved..." banner is centered properly, and the 
> lines/columns nearly maximize the screen but have been changed.  If I 
> re-run the command with "vim" instead of "gvim" then I get that rapidly 
> flitting cursor on the left hand side and an oddly placed banner, but 
> still, no crash.  I'm not sure that the patch I've attached will help; 
> both the modified and original vim show  1000 10000  when I do  :echo 
> &lines &columns (using gvim shows 63 236).

The error message suggests the restriction is counted in pixels, thus it
depends on the font size how many lines/columns that is.

There are other ways to set 'lines' and 'columns', also after startup.
These should be caught in the same way.

-- 
hundred-and-one symptoms of being an internet addict:
37. You start looking for hot HTML addresses in public restrooms.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
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

Raspunde prin e-mail lui