Christian Brabandt wrote:

> Hi Bram!
>
> On Sa, 24 Mär 2012, Bram Moolenaar wrote:
>
>>
>> Christian Brabandt wrote:
>>
>> [...]
>>
>> > > When pressing <F7>, it used to rotate through languages of
>> > > the spelling checker and print the current language at the bottom
>> > > of the screen. For example, it printed 1 line saying:
>> > >
>> > > language: en_us
>> > >
>> > > But after applying patch 7.3.477, pressing <F7> now scrolls the
>> > > screen one line upward and prints *2* lines at the bottom of the
>> > > screen saying:
>> > >
>> > > :call MySpellLang()
>> > > language: en_us
>> > >
>> > > I don't think that this change was intended or am I missing something?
>> >
>> > Yes this was changed by the patch intentionally, otherwise scrolling
>> > back didn't work correctly. You can use :echon, if you don't like this.
>>
>> I already changed the patch to only output the line break once.
>> But possibly it can be surpressed more often.  Or we can find a way to
>> clear the text stored for scrolling back.
>
> How about this patch:
>
> diff --git a/src/eval.c b/src/eval.c
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -20495,7 +20495,7 @@
>                {
>                    /* Put the output below the command, makes scrolling back
>                     * at more prompt work. */
> -                   msg_didout = TRUE;
> +                   sb_msg_eol();
>                    msg_start();
>                }
>            }
> diff --git a/src/message.c b/src/message.c
> --- a/src/message.c
> +++ b/src/message.c
> @@ -4891,5 +4891,11 @@
>      * written to the buffer if it were large enough. */
>     return (int)str_l;
>  }
> +    void
> +sb_msg_eol()
> +{
> +    if (last_msgchunk != NULL)
> +       last_msgchunk->sb_eol = TRUE;
> +}
>
> That should set sb_eol for the line the user entered, otherwise should
> behave as pre 7.3.477. That seems to fix scrolling backwards for me,
> while not requiring the user to enter anything after echo finishes for
> single lines.
>
>
> regards,
> Christian


Hi Christian

I confirm that your new patch works for me. Thanks.

One minor remark: we need a function prototype in src/proto/message.pro
for the new function sb_msg_eol() or else gcc gives a warning:

eval.c:20501:21: warning: implicit declaration of function ‘sb_msg_eol’

Regards
-- Dominique

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