vim 7.0c beta: strange c-u/c-d-behavior

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

vim 7.0c beta: strange c-u/c-d-behavior

Thomas Michael Engelke
Hello!

I had mapped my old gvim (6.3) <PageUp> and <PageDown> to <c-u><c-u>
and <c-d><c-d>, respectively. When I switched to 7.0c, it did not
consistently do what I was expecting: Scrolling down a page while
keeping the cursor on the same line. Sometimes it only scrolled down
and up 2 lines. I traced it back to <c-u> and <c-d> which sometimes
only scroll 1 line each. I'm not sure what the exact causes are and
will investigate further, just wanted to let you know.

Regards,

Thomas Engelke
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Jürgen Krämer

Hi,

Thomas Michael Engelke wrote:
>
> I had mapped my old gvim (6.3) <PageUp> and <PageDown> to <c-u><c-u>
> and <c-d><c-d>, respectively. When I switched to 7.0c, it did not
> consistently do what I was expecting: Scrolling down a page while
> keeping the cursor on the same line. Sometimes it only scrolled down
> and up 2 lines. I traced it back to <c-u> and <c-d> which sometimes
> only scroll 1 line each. I'm not sure what the exact causes are and
> will investigate further, just wanted to let you know.

ctrl-u and ctrl-d both take a count. If the count is not given the value
of 'scroll' is used which defaults to half a screen. If you---on purpose
or accidentally---give a count to ctrl-u or ctrl-d this count is used as
the default for all future ctrl-u and ctrl-d commands. See :help CTRL-U.

Regards,
Jürgen

--
Jürgen Krämer                              Softwareentwicklung
HABEL GmbH & Co. KG                        mailto:[hidden email]
Hinteres Öschle 2                          Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim                    Fax: +49 / 74 61 / 93 53 - 99
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Kyku-2
In reply to this post by Thomas Michael Engelke
Thomas Michael Engelke wrote:

> Hello!
>
> I had mapped my old gvim (6.3) <PageUp> and <PageDown> to <c-u><c-u>
> and <c-d><c-d>, respectively. When I switched to 7.0c, it did not
> consistently do what I was expecting: Scrolling down a page while
> keeping the cursor on the same line. Sometimes it only scrolled down
> and up 2 lines. I traced it back to <c-u> and <c-d> which sometimes
> only scroll 1 line each. I'm not sure what the exact causes are and
> will investigate further, just wanted to let you know.
>
> Regards,
>
> Thomas Engelke
>
>
>  
This happened to me with gvim70c, too, though I guess it is rather rare
problem. Maybe a problem with some extensions? Hmm... I don't know.
Anyhow, happy bugtracking, developers ;-)
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Thomas Michael Engelke
In reply to this post by Jürgen Krämer
2006/3/31, Jürgen Krämer <[hidden email]>:

>
> Hi,
>
> Thomas Michael Engelke wrote:
> >
> > I had mapped my old gvim (6.3) <PageUp> and <PageDown> to <c-u><c-u>
> > and <c-d><c-d>, respectively. When I switched to 7.0c, it did not
> > consistently do what I was expecting: Scrolling down a page while
> > keeping the cursor on the same line. Sometimes it only scrolled down
> > and up 2 lines. I traced it back to <c-u> and <c-d> which sometimes
> > only scroll 1 line each. I'm not sure what the exact causes are and
> > will investigate further, just wanted to let you know.
>
> ctrl-u and ctrl-d both take a count. If the count is not given the value
> of 'scroll' is used which defaults to half a screen. If you---on purpose
> or accidentally---give a count to ctrl-u or ctrl-d this count is used as
> the default for all future ctrl-u and ctrl-d commands. See :help CTRL-U.
>
> Regards,
> Jürgen

Alright, thanks. I will keep an eye on the value of "scroll", if I
encounter the problem again. Thanks Jürgen.

Regards,

Thomas Engelke

--
GPG-Key: tengelke.de/thomas_michael_engelke.asc
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Thomas Michael Engelke
2006/3/31, Gerald Lai <[hidden email]>:

> On Fri, 31 Mar 2006, Thomas Michael Engelke wrote:
>
> > 2006/3/31, Jürgen Krämer <[hidden email]>:
> >>
> >> Hi,
> >>
> >> Thomas Michael Engelke wrote:
> >>>
> >>> I had mapped my old gvim (6.3) <PageUp> and <PageDown> to <c-u><c-u>
> >>> and <c-d><c-d>, respectively. When I switched to 7.0c, it did not
> >>> consistently do what I was expecting: Scrolling down a page while
> >>> keeping the cursor on the same line. Sometimes it only scrolled down
> >>> and up 2 lines. I traced it back to <c-u> and <c-d> which sometimes
> >>> only scroll 1 line each. I'm not sure what the exact causes are and
> >>> will investigate further, just wanted to let you know.
> >>
> >> ctrl-u and ctrl-d both take a count. If the count is not given the value
> >> of 'scroll' is used which defaults to half a screen. If you---on purpose
> >> or accidentally---give a count to ctrl-u or ctrl-d this count is used as
> >> the default for all future ctrl-u and ctrl-d commands. See :help CTRL-U.
> >>
> >> Regards,
> >> Jürgen
> >
> > Alright, thanks. I will keep an eye on the value of "scroll", if I
> > encounter the problem again. Thanks Jürgen.
> >
> > Regards,
> >
> > Thomas Engelke
> >
> > --
> > GPG-Key: tengelke.de/thomas_michael_engelke.asc
> >
>
> You could make the mappings impervious to a count:
>
>    nnoremap <PageDown> <Esc><C-d><C-d>
>    nnoremap <PageUp>   <Esc><C-u><C-u>
>    inoremap <PageDown> <C-o><C-d><C-o><C-d>
>    inoremap <PageUp>   <C-o><C-u><C-o><C-u>
>    vnoremap <PageDown> <Esc>gv<C-d><C-d>
>    vnoremap <PageUp>   <Esc>gv<C-u><C-u>

Thanks, but the count doesn't seem to be the problem. I've narrowed it
down. The problem first occured when I tried to edit my syntax-file
(progress.vim): scroll was set to 1. I looked for a set of 'scroll' to
any value in vim.vim and my _vimrc, but couldn't find any. The only
setting I do regarding scrolling in my _vimrc is

set nostartofline

Can anybody reproduce the effect?

--
GPG-Key: tengelke.de/thomas_michael_engelke.asc
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Chris Allen
On 3/31/06, Thomas Michael Engelke <[hidden email]> wrote:
> Thanks, but the count doesn't seem to be the problem. I've narrowed it
> down. The problem first occured when I tried to edit my syntax-file
> (progress.vim): scroll was set to 1. I looked for a set of 'scroll' to
> any value in vim.vim and my _vimrc, but couldn't find any. The only
> setting I do regarding scrolling in my _vimrc is
>
> set nostartofline

Try seeing what "verbose set scroll?" gets you?  It should tell you
were it was last set.

> Can anybody reproduce the effect?

I cannot, given the information above.

HTH,
Chris Allen
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Thomas Michael Engelke
2006/3/31, Chris Allen <[hidden email]>:

> On 3/31/06, Thomas Michael Engelke <[hidden email]> wrote:
> > Thanks, but the count doesn't seem to be the problem. I've narrowed it
> > down. The problem first occured when I tried to edit my syntax-file
> > (progress.vim): scroll was set to 1. I looked for a set of 'scroll' to
> > any value in vim.vim and my _vimrc, but couldn't find any. The only
> > setting I do regarding scrolling in my _vimrc is
> >
> > set nostartofline
>
> Try seeing what "verbose set scroll?" gets you?  It should tell you
> were it was last set.
>
> > Can anybody reproduce the effect?
>
> I cannot, given the information above.

More information: It seems to occur only when at least 3 tabs are
open, and then only for the third and ascending tab number. I get
scroll values of 1 or less, 0 currently.

--
GPG-Key: tengelke.de/thomas_michael_engelke.asc
Reply | Threaded
Open this post in threaded view
|

Re: vim 7.0c beta: strange c-u/c-d-behavior

Bram Moolenaar
In reply to this post by Thomas Michael Engelke

Thomas Michael Engelke wrote:

> I had mapped my old gvim (6.3) <PageUp> and <PageDown> to <c-u><c-u>
> and <c-d><c-d>, respectively. When I switched to 7.0c, it did not
> consistently do what I was expecting: Scrolling down a page while
> keeping the cursor on the same line. Sometimes it only scrolled down
> and up 2 lines. I traced it back to <c-u> and <c-d> which sometimes
> only scroll 1 line each. I'm not sure what the exact causes are and
> will investigate further, just wanted to let you know.

You must be using tab pages.  The default value for 'scroll' wasn't set
properly.  It's fixed in the next snapshot.

--
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
                [real standing law in Massachusetts, United States of America]

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://www.ICCF.nl         ///