Re: Automatic scrollbar causes column growth
- Michael Henry wrote:
> By default in Gvim, creating or destroying a vertical split
> causes the left-side scrollbar to automatically be created or
> destroyed. There appears to be some kind of timing-related bug
> wherein Gvim is not always able to maintain the value of
> 'columns' at its original value.
> To demonstrate this, save the following snippet of VimL as
> function! TestColumns()
> let c1=&columns
> wincmd v
> let c2=&columns
> wincmd o
> let c3=&columns
> sleep 250m
> echomsg c1 c2 c3 &columns
> map <silent> <Space> :call TestColumns()<CR>
> Then, invoke Gvim as::
> gvim -u NONE '+set nocp | source scrollbar-column-growth.vim'
> Each time the spacebar is pressed, the value of 'columns' will be
> displayed at four points in time. The first and last values show
> the initial and final 'columns' values. The bug doesn't always
> manifest itself with each keypress, but when the bug occurs, the
> final 'columns' value will have grown larger than the initial value.
> Try pressing spacebar multiple times in a row, then looking at
> the resulting :messages. Here is a sample run::
> 80 80 80 80
> 80 80 80 80
> 80 80 82 82
> 82 82 84 84
> 84 84 86 86
> 86 86 88 86
> 86 86 86 86
> 86 86 86 88
> As you can see, sometimes the 'columns' value is always correct,
> sometimes it goes up and comes back down (e.g., ``86 86 88
> 86``), and sometimes it goes up permanently.
> I can work around the problem by removing the default ``L`` in
> 'guioptions'; the bug manifests only when a scrollbar is setup
> to appear automatically using ``L`` or ``R``.
> This test was done on Fedora 17 Linux with a self-compiled Vim
> with :version output shown after my signature, but this is a
> problem that have been around for a long time (years, I think,
> but I've only just now isolated it to a somewhat repeatable
Just wanted to note that I was able to duplicate something of this issue
(using Scientific Linux 6.3).
I hit space a lot, held it down a bit, etc. I'd get straight 189s, then
after quite a bit, I got 191s.
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
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.