comparison src/textprop.c @ 29730:0eeab24d3faf v9.0.0205

patch 9.0.0205: cursor in wrong position when inserting after virtual text Commit: https://github.com/vim/vim/commit/28c9f895716cfa8f1220bc41b72a534c0e10cabe Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 14 13:28:55 2022 +0100 patch 9.0.0205: cursor in wrong position when inserting after virtual text Problem: Cursor in wrong position when inserting after virtual text. (Ben Jackson) Solution: Put the cursor after the virtual text, where the text will be inserted. (closes #10914)
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 Aug 2022 14:30:04 +0200
parents bf965640744d
children 89e1d67814a9
comparison
equal deleted inserted replaced
29729:762a6032573f 29730:0eeab24d3faf
292 tmp_prop.tp_len = length; 292 tmp_prop.tp_len = length;
293 tmp_prop.tp_id = id; 293 tmp_prop.tp_id = id;
294 tmp_prop.tp_type = type->pt_id; 294 tmp_prop.tp_type = type->pt_id;
295 tmp_prop.tp_flags = text_flags 295 tmp_prop.tp_flags = text_flags
296 | (lnum > start_lnum ? TP_FLAG_CONT_PREV : 0) 296 | (lnum > start_lnum ? TP_FLAG_CONT_PREV : 0)
297 | (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 0); 297 | (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 0)
298 | ((type->pt_flags & PT_FLAG_INS_START_INCL)
299 ? TP_FLAG_START_INCL : 0);
298 mch_memmove(newprops + i * sizeof(textprop_T), &tmp_prop, 300 mch_memmove(newprops + i * sizeof(textprop_T), &tmp_prop,
299 sizeof(textprop_T)); 301 sizeof(textprop_T));
300 302
301 if (i < proplen) 303 if (i < proplen)
302 mch_memmove(newprops + (i + 1) * sizeof(textprop_T), 304 mch_memmove(newprops + (i + 1) * sizeof(textprop_T),