diff src/edit.c @ 16904:9138e2c60bf1 v8.1.1453

patch 8.1.1453: popup window "moved" property not implemented yet commit https://github.com/vim/vim/commit/3397f74ac2ac27f1eef48e950c3c8eeb0338fe55 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 2 18:40:06 2019 +0200 patch 8.1.1453: popup window "moved" property not implemented yet Problem: Popup window "moved" property not implemented yet. Solution: Implement it.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jun 2019 18:45:06 +0200
parents 695d9ef00b03
children 5ed4965ebc7b
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -1456,8 +1456,7 @@ ins_need_undo_get(void)
  * inserting sequences of characters (e.g., for CTRL-R).
  */
     void
-ins_redraw(
-    int		ready UNUSED)	    /* not busy with something */
+ins_redraw(int ready)	    // not busy with something
 {
 #ifdef FEAT_CONCEAL
     linenr_T	conceal_old_cursor_line = 0;
@@ -1468,10 +1467,12 @@ ins_redraw(
     if (char_avail())
 	return;
 
-#if defined(FEAT_CONCEAL)
     /* Trigger CursorMoved if the cursor moved.  Not when the popup menu is
      * visible, the command might delete it. */
     if (ready && (has_cursormovedI()
+# ifdef FEAT_TEXT_PROP
+		|| popup_visible
+# endif
 # if defined(FEAT_CONCEAL)
 		|| curwin->w_p_cole > 0
 # endif
@@ -1497,6 +1498,10 @@ ins_redraw(
 	    update_curswant();
 	    ins_apply_autocmds(EVENT_CURSORMOVEDI);
 	}
+#ifdef FEAT_TEXT_PROP
+	if (popup_visible)
+	    popup_check_cursor_pos();
+#endif
 # ifdef FEAT_CONCEAL
 	if (curwin->w_p_cole > 0)
 	{
@@ -1507,7 +1512,6 @@ ins_redraw(
 # endif
 	last_cursormoved = curwin->w_cursor;
     }
-#endif
 
     /* Trigger TextChangedI if b_changedtick differs. */
     if (ready && has_textchangedI()
@@ -3859,7 +3863,7 @@ replace_push(
     if (replace_stack_len <= replace_stack_nr)
     {
 	replace_stack_len += 50;
-	p = alloc(sizeof(char_u) * replace_stack_len);
+	p = ALLOC_MULT(char_u, replace_stack_len);
 	if (p == NULL)	    /* out of memory */
 	{
 	    replace_stack_len -= 50;