comparison src/textprop.c @ 19642:647ef636a11e v8.2.0378

patch 8.2.0378: prop_find() does not find all props Commit: https://github.com/vim/vim/commit/346f18e5fe12e6aaba5a6a18f6d0deb55eb7a9e8 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 13 21:36:40 2020 +0100 patch 8.2.0378: prop_find() does not find all props Problem: prop_find() does not find all props. Solution: Check being in the start line. (Axel Forsman, closes https://github.com/vim/vim/issues/5776)
author Bram Moolenaar <Bram@vim.org>
date Fri, 13 Mar 2020 21:45:03 +0100
parents 1d493fce1fbd
children d2153928b376
comparison
equal deleted inserted replaced
19641:73b2c928a8aa 19642:647ef636a11e
661 for (i = 0; i < count; ++i) 661 for (i = 0; i < count; ++i)
662 { 662 {
663 mch_memmove(&prop, text + textlen + i * sizeof(textprop_T), 663 mch_memmove(&prop, text + textlen + i * sizeof(textprop_T),
664 sizeof(textprop_T)); 664 sizeof(textprop_T));
665 665
666 if (dir < 0) 666 if (lnum == lnum_start)
667 { 667 if (dir < 0)
668 if (col < prop.tp_col) 668 {
669 break; 669 if (col < prop.tp_col)
670 } 670 break;
671 else if (prop.tp_col + prop.tp_len - (prop.tp_len != 0) < col) 671 }
672 continue; 672 else if (prop.tp_col + prop.tp_len - (prop.tp_len != 0) < col)
673 continue;
673 674
674 if (prop.tp_id == id || prop.tp_type == type_id) 675 if (prop.tp_id == id || prop.tp_type == type_id)
675 { 676 {
676 // Check if the starting position has text props. 677 // Check if the starting position has text props.
677 if (lnum_start == lnum 678 if (lnum_start == lnum