On 26/11/2018 10:54, Christian Brabandt wrote: > On Mo, 26 Nov 2018, Christian Brabandt wrote: >> This looks very similar to the crash posted here: >> https://github.com/vim/vim/pull/2107#issuecomment-418816582 >> >> I guess the redrawing() function is being called again, that triggers >> the win_free() and will make curwin invalid. >> >> Perhaps we do need a patch similar to this one >> https://github.com/vim/vim/pull/2107#issuecomment-418882802 > > How about the following patch: > > diff --git a/src/move.c b/src/move.c > index 68404e3f7..c25d6271f 100644 > --- a/src/move.c > +++ b/src/move.c > @@ -687,6 +687,8 @@ validate_cline_row(void) > /* > * Compute wp->w_cline_row and wp->w_cline_height, based on the current value > * of wp->w_topline. > + * Might cause processing of async messages. > + * If async causes wp to become invalid, uses curwin > */ > static void > curs_rows(win_T *wp) > @@ -699,10 +701,16 @@ curs_rows(win_T *wp) > long fold_count; > #endif > > - /* Check if wp->w_lines[].wl_size is invalid */ > - all_invalid = (!redrawing() > - || wp->w_lines_valid == 0 > - || wp->w_lines[0].wl_lnum > wp->w_topline); > + // Check if wp->w_lines[].wl_size is invalid > + all_invalid = (wp->w_lines_valid == 0 > + || wp->w_lines[0].wl_lnum > wp->w_topline > + || !redrawing()); > + > + // redrawing might have processed async messages, > + // causing wp to become invalid > + if (!win_valid(wp)) > + wp = curwin; > + > i = 0; > wp->w_cline_row = 0; > for (lnum = wp->w_topline; lnum < wp->w_cursor.lnum; ++i) > > > Best, > Christian >
That patch fixes building on Launchpad: https://launchpad.net/~jonathonf/+archive/ubuntu/vim-staging/+build/15706279 :D J -- -- 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/d/optout.
signature.asc
Description: OpenPGP digital signature
