comparison src/structs.h @ 29465:1ae3e2d691a0 v9.0.0074

patch 9.0.0074: Coverity warns for double free Commit: https://github.com/vim/vim/commit/34a1f779791fd4137547fa72addeb147b7704604 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 26 11:20:48 2022 +0100 patch 9.0.0074: Coverity warns for double free Problem: Coverity warns for double free. Solution: Reset cts_text_prop_count when freeing cts_text_props.
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Jul 2022 12:30:05 +0200
parents 057c26b5c33a
children 14b139cbec49
comparison
equal deleted inserted replaced
29464:3a229fb63f78 29465:1ae3e2d691a0
4568 win_T *cts_win; 4568 win_T *cts_win;
4569 linenr_T cts_lnum; // zero when not using text properties 4569 linenr_T cts_lnum; // zero when not using text properties
4570 char_u *cts_line; // start of the line 4570 char_u *cts_line; // start of the line
4571 char_u *cts_ptr; // current position in line 4571 char_u *cts_ptr; // current position in line
4572 #ifdef FEAT_PROP_POPUP 4572 #ifdef FEAT_PROP_POPUP
4573 int cts_text_prop_count; // number of text props 4573 int cts_text_prop_count; // number of text props; when zero
4574 textprop_T *cts_text_props; // text props (allocated) or NULL 4574 // cts_text_props is not used
4575 char cts_has_prop_with_text; // TRUE if if a property inserts text 4575 textprop_T *cts_text_props; // text props (allocated)
4576 char cts_has_prop_with_text; // TRUE if if a property inserts text
4576 int cts_cur_text_width; // width of current inserted text 4577 int cts_cur_text_width; // width of current inserted text
4577 #endif 4578 #endif
4578 int cts_vcol; // virtual column at current position 4579 int cts_vcol; // virtual column at current position
4579 } chartabsize_T; 4580 } chartabsize_T;