To: vim_dev@googlegroups.com Subject: Patch 8.2.2644 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2644 Problem: prop_clear() causes a screen update even when nothing changed. Solution: Only redraw when a property was cleared. (Dominique Pellé) Files: src/textprop.c *** ../vim-8.2.2643/src/textprop.c 2021-03-21 22:29:47.210542590 +0100 --- src/textprop.c 2021-03-22 19:41:11.656505737 +0100 *************** *** 535,540 **** --- 535,541 ---- linenr_T end = start; linenr_T lnum; buf_T *buf = curbuf; + int did_clear = FALSE; if (argvars[1].v_type != VAR_UNKNOWN) { *************** *** 562,567 **** --- 563,569 ---- len = STRLEN(text) + 1; if ((size_t)buf->b_ml.ml_line_len > len) { + did_clear = TRUE; if (!(buf->b_ml.ml_flags & ML_LINE_DIRTY)) { char_u *newtext = vim_strsave(text); *************** *** 575,581 **** buf->b_ml.ml_line_len = (int)len; } } ! redraw_buf_later(buf, NOT_VALID); } /* --- 577,584 ---- buf->b_ml.ml_line_len = (int)len; } } ! if (did_clear) ! redraw_buf_later(buf, NOT_VALID); } /* *** ../vim-8.2.2643/src/version.c 2021-03-22 19:37:02.545019774 +0100 --- src/version.c 2021-03-22 19:42:13.260375683 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2644, /**/ -- hundred-and-one symptoms of being an internet addict: 19. All of your friends have an @ in their names. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///