Sunday, January 30, 2011

Re: Scrolling screen lines, I knew, it's impossible.

Ben Schmidt wrote:

> >> On 27/01/11 3:38 AM, oCameLo wrote:
> >>> There's so many questions and feature requests about use mouse to
> >>> scroll screen lines, but until now, it's still impossible.
> >>
> >> Bram, you're not opposed to this kind of feature, are you? So if I did
> >> some work on it, it could be included in Vim at some stage, right?
> >
> > This is a change that has a high probablity of introducing new bugs.
>
> True, though if coded carefully, these bugs should only appear when the
> feature is turned on.
>
> > There are also a few questions about how to allow the user to access
> > this, with an option setting or with different scroll commands?
> > Probably a setting, so that it can work with scrollbars.
>
> I think it would probably be best to do this in stages:
>
> 1. Add new commands to scroll one screen line at a time. Test it out,
> including by mapping the scrollwheel to those new commands in the X
> GUIs. This shouldn't be too hard, as Vim can already display lines
> starting part way through; it just usually doesn't. The experience
> wouldn't be very smooth yet either, but screen-line scrolling would at
> least be possible, and it would pave the way for something better.
>
> 2. Add an option to make scrolling work with screen lines. The meaning
> of this option would be to affect all scrolling. To start with, though,
> just make it change the meaning of the scroll wheel in X GUIs (already
> implemented), and where easy, the clicks of the scroll bar arrows. It
> might not affect Windows yet; it depends how the scrolling works there,
> and I haven't looked in any detail.
>
> 3. Make other parts of Vim, such as moving line-to-line, vertical jumps,
> and scrolling for scrolloff honour the new option, too, choosing window
> positions that begin with partial lines. This would make the editing
> experience pretty smooth.
>
> 4. Update the code for scrollbars more thoroughly, so that dragging the
> bar can work with screen lines, too. Windows should definitely benefit
> by this stage and the feature would basically be finished.
>
> 5. Pick the nits of little bugs that we can't foresee.
>
> What do you think? Would this be an OK way to proceed?

Sounds good.

--
"The question of whether computers can think is just like the question
of whether submarines can swim." -- Edsger W. Dijkstra

/// Bram Moolenaar -- Bram@Moolenaar.net -- 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_use" 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

No comments:

Post a Comment