Mercurial > vim
comparison src/textprop.c @ 29708:d97b2ce26258 v9.0.0194
patch 9.0.0194: cursor displayed in wrong position after removing text prop
Commit: https://github.com/vim/vim/commit/326c5d36e7cb8526330565109c17b4a13ff790ae
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 12 13:05:49 2022 +0100
patch 9.0.0194: cursor displayed in wrong position after removing text prop
Problem: Cursor displayed in wrong position after removing text prop. (Ben
Jackson)
Solution: Invalidate the cursor position. (closes #10898)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Aug 2022 14:15:04 +0200 |
parents | c1c599a367d4 |
children | bf965640744d |
comparison
equal
deleted
inserted
replaced
29707:325f7101453d | 29708:d97b2ce26258 |
---|---|
308 buf->b_ml.ml_line_ptr = newtext; | 308 buf->b_ml.ml_line_ptr = newtext; |
309 buf->b_ml.ml_line_len += sizeof(textprop_T); | 309 buf->b_ml.ml_line_len += sizeof(textprop_T); |
310 buf->b_ml.ml_flags |= ML_LINE_DIRTY; | 310 buf->b_ml.ml_flags |= ML_LINE_DIRTY; |
311 } | 311 } |
312 | 312 |
313 changed_line_display_buf(buf); | |
313 changed_lines_buf(buf, start_lnum, end_lnum + 1, 0); | 314 changed_lines_buf(buf, start_lnum, end_lnum + 1, 0); |
314 res = OK; | 315 res = OK; |
315 | 316 |
316 theend: | 317 theend: |
317 vim_free(text); | 318 vim_free(text); |
1505 } | 1506 } |
1506 } | 1507 } |
1507 | 1508 |
1508 if (first_changed > 0) | 1509 if (first_changed > 0) |
1509 { | 1510 { |
1511 changed_line_display_buf(buf); | |
1510 changed_lines_buf(buf, first_changed, last_changed + 1, 0); | 1512 changed_lines_buf(buf, first_changed, last_changed + 1, 0); |
1511 redraw_buf_later(buf, VALID); | 1513 redraw_buf_later(buf, VALID); |
1512 } | 1514 } |
1513 | 1515 |
1514 if (did_remove_text) | 1516 if (did_remove_text) |