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(¶ms);
+ 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).
Regards,
Chip Campbell
--
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
*** keep_bufexplorer.vim 2010-10-14 11:59:50.000000000 -0400
--- bufexplorer.vim 2010-10-14 13:27:48.000000000 -0400
***************
*** 316,327 ****
" BECleanup {{{1
function! s:BECleanup()
! let &insertmode = s:_insertmode
! let &showcmd = s:_showcmd
! let &cpo = s:_cpo
! let &report = s:_report
! let &list = s:_list
! let s:running = 0
let s:splitMode = ""
delmarks!
--- 316,327 ----
" BECleanup {{{1
function! s:BECleanup()
! if exists("s:_insertmode")|let &insertmode = s:_insertmode|endif
! if exists("s:_showcmd") |let &showcmd = s:_showcmd |endif
! if exists("s:_cpo") |let &cpo = s:_cpo |endif
! if exists("s:_report") |let &report = s:_report |endif
! if exists("s:_list") |let &list = s:_list |endif
! let s:running = 0
let s:splitMode = ""
delmarks!
***************
*** 720,726 ****
endif
if bufexists(_bufNbr)
! if bufnr("#") == _bufNbr
return s:BEClose()
endif
--- 720,726 ----
endif
if bufexists(_bufNbr)
! if bufnr("#") == _bufNbr && !exists("g:bufExplorerChgWin")
return s:BEClose()
endif
***************
*** 749,755 ****
"No, the use did not ask to open the selected buffer in a tab.
" Are we suppose to move to the tab where this active buffer is?
! if bufloaded(_bufNbr) && g:bufExplorerFindActive
" Close the BE window.
call s:BEClose()
--- 749,757 ----
"No, the use did not ask to open the selected buffer in a tab.
" Are we suppose to move to the tab where this active buffer is?
! if exists("g:bufExplorerChgWin")
! exe g:bufExplorerChgWin."wincmd w"
! elseif bufloaded(_bufNbr) && g:bufExplorerFindActive
" Close the BE window.
call s:BEClose()
***************
*** 773,778 ****
--- 775,798 ----
" Make the buffer 'listed' again.
call setbufvar(_bufNbr, "&buflisted", "1")
+
+ " call any associated function references
+ " g:bufExplorerFuncRef may be an individual function reference
+ " or it may be a list containing function references.
+ " It will ignore anything that's not a function reference.
+ " See :help FuncRef for more on function references.
+ if exists("g:BufExplorerFuncRef")
+ if type(g:BufExplorerFuncRef) == 2
+ keepj call g:BufExplorerFuncRef()
+ elseif type(g:BufExplorerFuncRef) == 3
+ for FncRef in g:BufExplorerFuncRef
+ if type(FncRef) == 2
+ keepj call FncRef()
+ endif
+ endfor
+ endif
+ endif
+
else
call s:BEError("Sorry, that buffer no longer exists, please select
another")
call s:BEDeleteBuffer(_bufNbr, "wipe")