patch 9.1.0956: completion may crash, completion highlight wrong with preview window

Problem:  completion may crash, completion highlight wrong with preview
          window (after v9.1.0954)
Solution: correctly calculate scroll offset, check for preview window
          when adding extra highlighting
          (glepnir)

when there have a preview window prepare_tagpreview
will change curwin to preview window and this may cause
ComplMatchIns check condition not correct. check wp is curwin
and also the type of wp is not a preview or poup info

fixes: #16284
closes: #16283

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/drawline.c b/src/drawline.c
index bc8e4d2..f383857 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -1869,7 +1869,7 @@
     }
 #endif
 
-    if ((State & MODE_INSERT) && in_curline && ins_compl_active())
+    if ((State & MODE_INSERT) && in_curline && ins_compl_win_active(wp))
 	area_highlighting = TRUE;
 
 #ifdef FEAT_SYN_HL
@@ -2415,7 +2415,8 @@
 #endif
 
 		// Check if ComplMatchIns highlight is needed.
-		if ((State & MODE_INSERT) && in_curline && ins_compl_active())
+		if ((State & MODE_INSERT) && in_curline
+						&& ins_compl_win_active(wp))
 		{
 		    int ins_match_attr =
 			ins_compl_col_range_attr((int)(ptr - line));