diff src/ex_getln.c @ 15138:9df130fd5e0d v8.1.0579

patch 8.1.0579: cannot attach properties to text commit https://github.com/vim/vim/commit/98aefe7c3250bb5d4153b994f878594d1745424e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 13 22:20:09 2018 +0100 patch 8.1.0579: cannot attach properties to text Problem: Cannot attach properties to text. Solution: First part of adding text properties.
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Dec 2018 22:30:08 +0100
parents 70aa5caa9f0d
children db5d2429bda3
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -769,6 +769,21 @@ may_add_char_to_search(int firstc, int *
 		    stuffcharReadbuff(*c);
 		    *c = '\\';
 		}
+#ifdef FEAT_MBYTE
+		// add any composing characters
+		if (mb_char2len(*c) != mb_ptr2len(ml_get_cursor()))
+		{
+		    int save_c = *c;
+
+		    while (mb_char2len(*c) != mb_ptr2len(ml_get_cursor()))
+		    {
+			curwin->w_cursor.col += mb_char2len(*c);
+			*c = gchar_cursor();
+			stuffcharReadbuff(*c);
+		    }
+		    *c = save_c;
+		}
+#endif
 		return FAIL;
 	    }
 	}