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/proto/insexpand.pro b/src/proto/insexpand.pro
index 2e769b8..24c325f 100644
--- a/src/proto/insexpand.pro
+++ b/src/proto/insexpand.pro
@@ -36,6 +36,7 @@
 char_u *find_word_end(char_u *ptr);
 void ins_compl_clear(void);
 int ins_compl_active(void);
+int ins_compl_win_active(win_T *wp);
 int ins_compl_used_match(void);
 void ins_compl_init_get_longest(void);
 int ins_compl_interrupted(void);