On 01-Jul-2013 23:29 +0200, Christian Brabandt wrote:

> On Mon, July 1, 2013 17:45, Ingo Karkat wrote:
>> Hello Vim developers,
>>
>> I noticed a regression:
>>
>> $ vim -N -u NONE
>> :echo "foo"
>> " The intro message is cleared, the (now empty) UI does not show "foo".
>> " Expected behavior: The intro message stays visible, the command-line
>> shows "foo".
>>
>> This happens with any command that echoes a single line, e.g. also with
>> :set ic?, or :nmap. Only the very first command (output) is affected;
>> subsequent commands (after the intro message was cleared) show up fine.
>> I see this in Vim 7.3.1280 (huge build on Ubuntu 13.04/x64), but not in
>> Vim 7.3.712. It also doesn't happen in GVIM, only in the terminal UI.
> 
> I don't see this for vim -u NONE -N (and I suspect, this is terminal
> related), ...

Correct, this doesn't happen in GVIM, and also doesn't happen in the
Windows console version, only in a Linux terminal.

> ...but for me this happens, because I have a plugin, that resets
> some highlighting groups whenever the statusline is drawn. This triggers
> a do_highlight() call, which in turn calls redraw_win_later() and resets
> must_redraw, although it has been set to zero earlier in update_screen()
> 
> This patch fixes it for me, but I am not sure, this also fixes your
> issue:
> 
> diff --git a/src/screen.c b/src/screen.c
> --- a/src/screen.c
> +++ b/src/screen.c
> @@ -327,6 +327,7 @@
>  {
>      win_T    *wp;
>      static int       did_intro = FALSE;
> +    int              cur_must_redraw = must_redraw;
>  #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
>      int              did_one;
>  #endif
> @@ -335,16 +336,16 @@
>      if (!screen_valid(TRUE))
>       return;
> 
> -    if (must_redraw)
> -    {
> -     if (type < must_redraw)     /* use maximal type */
> -         type = must_redraw;
> +    if (cur_must_redraw)
> +    {
> +     if (type < cur_must_redraw)         /* use maximal type */
> +         type = cur_must_redraw;
> 
>       /* must_redraw is reset here, so that when we run into some weird
>        * reason to redraw while busy redrawing (e.g., asynchronous
>        * scrolling), or update_topline() in win_update() will cause a
>        * scroll, the screen will be redrawn later or in win_update(). */
> -     must_redraw = 0;
> +     cur_must_redraw = 0;
>      }
> 
>      /* Need to update w_lines[]. */
> @@ -356,7 +357,7 @@
>      if (!redrawing() || updating_screen)
>      {
>       redraw_later(type);             /* remember type for next time */
> -     must_redraw = type;
> +     cur_must_redraw = type;
>       if (type > INVERTED_ALL)
>           curwin->w_lines_valid = 0;  /* don't use w_lines[].wl_size now */
>       return;
> @@ -594,6 +595,7 @@
>       gui_update_scrollbars(FALSE);
>      }
>  #endif
> +    must_redraw = cur_must_redraw;
>  }
> 
>  #if defined(FEAT_CONCEAL) || defined(PROTO)

No, unfortunately not, but thanks for trying. The behavior is exactly
the same: The intro message disappears (it should not), and this screen
refresh probably also removes the message.

-- regards, ingo

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui