Mercurial > vim
comparison src/spell.c @ 28848:ba81f4ed59e2 v8.2.4947
patch 8.2.4947: text properties not adjusted when accepting spell suggestion
Commit: https://github.com/vim/vim/commit/b7a701255578b38896631ba20556b856e8888069
Author: LemonBoy <thatlemon@gmail.com>
Date: Fri May 13 12:41:50 2022 +0100
patch 8.2.4947: text properties not adjusted when accepting spell suggestion
Problem: Text properties not adjusted when accepting spell suggestion.
Solution: Adjust text properties when text changes. (closes https://github.com/vim/vim/issues/10414)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 13 May 2022 13:45:03 +0200 |
parents | 4dcccb2673fe |
children | 46fa2d54e389 |
comparison
equal
deleted
inserted
replaced
28847:cb325630cbf6 | 28848:ba81f4ed59e2 |
---|---|
2911 mch_memmove(p, line, curwin->w_cursor.col); | 2911 mch_memmove(p, line, curwin->w_cursor.col); |
2912 STRCPY(p + curwin->w_cursor.col, repl_to); | 2912 STRCPY(p + curwin->w_cursor.col, repl_to); |
2913 STRCAT(p, line + curwin->w_cursor.col + STRLEN(repl_from)); | 2913 STRCAT(p, line + curwin->w_cursor.col + STRLEN(repl_from)); |
2914 ml_replace(curwin->w_cursor.lnum, p, FALSE); | 2914 ml_replace(curwin->w_cursor.lnum, p, FALSE); |
2915 changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); | 2915 changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); |
2916 if (curbuf->b_has_textprop && addlen != 0) | |
2917 adjust_prop_columns(curwin->w_cursor.lnum, | |
2918 curwin->w_cursor.col, addlen, APC_SUBSTITUTE); | |
2916 | 2919 |
2917 if (curwin->w_cursor.lnum != prev_lnum) | 2920 if (curwin->w_cursor.lnum != prev_lnum) |
2918 { | 2921 { |
2919 ++sub_nlines; | 2922 ++sub_nlines; |
2920 prev_lnum = curwin->w_cursor.lnum; | 2923 prev_lnum = curwin->w_cursor.lnum; |