Mercurial > vim
comparison src/textprop.c @ 24643:09e64e81c473 v8.2.2860
patch 8.2.2860: adding a text property causes the whole window to be redawn
Commit: https://github.com/vim/vim/commit/1764faa38645a559172e9a31f08447385835de81
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 16 20:18:57 2021 +0200
patch 8.2.2860: adding a text property causes the whole window to be redawn
Problem: Adding a text property causes the whole window to be redawn.
Solution: Use changed_lines_buf() to only redraw the affected lines.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 May 2021 20:30:02 +0200 |
parents | 7422f2f719a3 |
children | 3f6a0ff1c5d3 |
comparison
equal
deleted
inserted
replaced
24642:6f451b9cda8e | 24643:09e64e81c473 |
---|---|
343 buf->b_ml.ml_line_len += sizeof(textprop_T); | 343 buf->b_ml.ml_line_len += sizeof(textprop_T); |
344 buf->b_ml.ml_flags |= ML_LINE_DIRTY; | 344 buf->b_ml.ml_flags |= ML_LINE_DIRTY; |
345 } | 345 } |
346 | 346 |
347 buf->b_has_textprop = TRUE; // this is never reset | 347 buf->b_has_textprop = TRUE; // this is never reset |
348 redraw_buf_later(buf, NOT_VALID); | 348 changed_lines_buf(buf, start_lnum, end_lnum + 1, 0); |
349 redraw_buf_later(buf, VALID); | |
349 } | 350 } |
350 | 351 |
351 /* | 352 /* |
352 * Fetch the text properties for line "lnum" in buffer "buf". | 353 * Fetch the text properties for line "lnum" in buffer "buf". |
353 * Returns the number of text properties and, when non-zero, a pointer to the | 354 * Returns the number of text properties and, when non-zero, a pointer to the |