On Nov 4, 3:35 pm, björn <[email protected]> wrote:
>
> Thanks.  I just tried reproducing with snapshot 52 (the version you
> used when reporting this issue originally) and I can't repro either.
> Weird.

Perhaps a change in Mac OS X?

> I'm be happy to merge this, if there is a regression we'll just have
> to find another fix, but...I notice several places in window.c where
> the same line that you just patched appears.  Should we perhaps change
> all of them to NOT_VALID instead of CLEAR?  I have to take a closer
> look, but I'd value your input.

I can see three places where we are using CLEAR as a special case for
MacVim:

- in win_split_ins(), which is used for inserting a new split

- in win_split(), which is used for splitting an existing window

- in win_new_height(), which is used to set the vertical height of the
window

To be honest I am not sure why it's needed in any of those places, as
one would think that SOME_VALID or NOT_VALID would be enough; quoting
from the definitions in src/vim.h:

  #define SOME_VALID              35  /* like NOT_VALID but may scroll
*/
  #define NOT_VALID               40  /* buffer needs complete redraw
*/
  #define CLEAR                   50  /* screen messed up, clear it */

The meaning of these is described in depth in src/screen.c:

 * Commands that change how a window is displayed (e.g., setting
'list') or
 * invalidate the contents of a window in another way (e.g., change
fold
 * settings), must call redraw_later(NOT_VALID) to have the whole
window
 * redisplayed by update_screen() later.
 *
 * Commands that change how a buffer is displayed (e.g., setting
'tabstop')
 * must call redraw_curbuf_later(NOT_VALID) to have all the windows
for the
 * buffer redisplayed by update_screen() later.
 *
 * Commands that change highlighting and possibly cause a scroll too
must call
 * redraw_later(SOME_VALID) to update the whole window but still use
scrolling
 * to avoid redrawing everything.  But the length of displayed lines
must not
 * change, use NOT_VALID then.
 *
 * Commands that move the window position must call
redraw_later(NOT_VALID).
 * TODO: should minimize redrawing by scrolling when possible.
 *
 * Commands that change everything (e.g., resizing the screen) must
call
 * redraw_all_later(NOT_VALID) or redraw_all_later(CLEAR).

So, I don't know. I would think that CLEAR would never be needed, to
be honest, when NOT_VALID/SOME_VALID is enough on other platforms...

But yeah, as you say, there's always the risk of regressing.

Cheers,
Wincent

-- 
You received this message from the "vim_mac" 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

Reply via email to