comparison src/textprop.c @ 18442:4fd68dcf6d88 v8.1.2215

patch 8.1.2215: unreachable code in adjusting text prop columns Commit: https://github.com/vim/vim/commit/7aee6876eb4a66cc9d475e30bb58c060e7d4e90e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 25 21:49:38 2019 +0200 patch 8.1.2215: unreachable code in adjusting text prop columns Problem: Unreachable code in adjusting text prop columns. Solution: Remove the code. (Christian Brabandt)
author Bram Moolenaar <Bram@vim.org>
date Fri, 25 Oct 2019 22:00:04 +0200
parents eaf8b21d80e7
children 9e6d5a4abb1c
comparison
equal deleted inserted replaced
18441:176f51ad4211 18442:4fd68dcf6d88
1065 (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL)); 1065 (pt != NULL && (pt->pt_flags & PT_FLAG_INS_START_INCL));
1066 1066
1067 if (bytes_added > 0 1067 if (bytes_added > 0
1068 && (tmp_prop.tp_col >= col + (start_incl ? 2 : 1))) 1068 && (tmp_prop.tp_col >= col + (start_incl ? 2 : 1)))
1069 { 1069 {
1070 if (tmp_prop.tp_col < col + (start_incl ? 2 : 1)) 1070 tmp_prop.tp_col += bytes_added;
1071 {
1072 tmp_prop.tp_len += (tmp_prop.tp_col - 1 - col) + bytes_added;
1073 tmp_prop.tp_col = col + 1;
1074 }
1075 else
1076 tmp_prop.tp_col += bytes_added;
1077 // Save for undo if requested and not done yet. 1071 // Save for undo if requested and not done yet.
1078 if ((flags & APC_SAVE_FOR_UNDO) && !dirty) 1072 if ((flags & APC_SAVE_FOR_UNDO) && !dirty)
1079 u_savesub(lnum); 1073 u_savesub(lnum);
1080 dirty = TRUE; 1074 dirty = TRUE;
1081 } 1075 }