updated for version 7.0153
diff --git a/src/Make_bc5.mak b/src/Make_bc5.mak
index 99009c5..3e1640e 100644
--- a/src/Make_bc5.mak
+++ b/src/Make_bc5.mak
@@ -561,6 +561,7 @@
 	$(OBJDIR)\normal.obj \
 	$(OBJDIR)\ops.obj \
 	$(OBJDIR)\option.obj \
+	$(OBJDIR)\popupmenu.obj \
 	$(OBJDIR)\quickfix.obj \
 	$(OBJDIR)\regexp.obj \
 	$(OBJDIR)\screen.obj \
diff --git a/src/Make_ivc.mak b/src/Make_ivc.mak
index 2326c30..f6b3694 100644
--- a/src/Make_ivc.mak
+++ b/src/Make_ivc.mak
@@ -241,6 +241,7 @@
 	"$(INTDIR)/option.obj" \
 	"$(INTDIR)/os_mswin.obj" \
 	"$(INTDIR)/os_win32.obj" \
+	"$(INTDIR)/popupmenu.obj" \
 	"$(INTDIR)/quickfix.obj" \
 	"$(INTDIR)/regexp.obj" \
 	"$(INTDIR)/screen.obj" \
@@ -597,6 +598,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\popupmenu.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\quickfix.c
 # End Source File
 # Begin Source File
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index 164ed50..ad46c19 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -402,6 +402,7 @@
 	$(OUTDIR)\os_mswin.obj \
 	$(OUTDIR)\os_win32.obj \
 	$(OUTDIR)\pathdef.obj \
+	$(OUTDIR)\popupmenu.obj \
 	$(OUTDIR)\quickfix.obj \
 	$(OUTDIR)\regexp.obj \
 	$(OUTDIR)\screen.obj \
@@ -896,6 +897,8 @@
 $(OUTDIR)/pathdef.obj:	$(OUTDIR) auto/pathdef.c  $(INCL)
 	$(CC) $(CFLAGS) auto/pathdef.c
 
+$(OUTDIR)/popupmenu.obj:	$(OUTDIR) popupmenu.c  $(INCL)
+
 $(OUTDIR)/quickfix.obj:	$(OUTDIR) quickfix.c  $(INCL)
 
 $(OUTDIR)/regexp.obj:	$(OUTDIR) regexp.c  $(INCL)
@@ -986,6 +989,7 @@
 	proto/option.pro \
 	proto/os_mswin.pro \
 	proto/os_win32.pro \
+	proto/popupmenu.pro \
 	proto/quickfix.pro \
 	proto/regexp.pro \
 	proto/screen.pro \
diff --git a/src/main.aap b/src/main.aap
index f31f929..3b16f17 100644
--- a/src/main.aap
+++ b/src/main.aap
@@ -256,6 +256,7 @@
         option.c
         os_unix.c
         auto/pathdef.c
+        popupmenu.c
         quickfix.c
         regexp.c
         screen.c
diff --git a/src/message.c b/src/message.c
index 0a2fe99..1478672 100644
--- a/src/message.c
+++ b/src/message.c
@@ -27,6 +27,7 @@
 static void msg_puts_attr_len __ARGS((char_u *str, int maxlen, int attr));
 static void msg_puts_display __ARGS((char_u *str, int maxlen, int attr, int recurse));
 static void msg_scroll_up __ARGS((void));
+static void inc_msg_scrolled __ARGS((void));
 static void store_sb_text __ARGS((char_u **sb_str, char_u *s, int attr, int *sb_col, int finish));
 static void t_puts __ARGS((int *t_col, char_u *t_s, char_u *s, int attr));
 static void msg_puts_printf __ARGS((char_u *str, int maxlen));
@@ -207,7 +208,7 @@
 			       && !exmode_active && msg_silent == 0) || force)
     {
 	len = vim_strsize(s);
-	if (msg_scrolled)
+	if (msg_scrolled != 0)
 	    /* Use all the columns. */
 	    room = (int)(Rows - msg_row) * Columns - 1;
 	else
@@ -634,7 +635,7 @@
     emsg_on_display = TRUE;	/* remember there is an error message */
     ++msg_scroll;		/* don't overwrite a previous message */
     attr = hl_attr(HLF_E);	/* set highlight mode for error messages */
-    if (msg_scrolled)
+    if (msg_scrolled != 0)
 	need_wait_return = TRUE;    /* needed in case emsg() is called after
 				     * wait_return has reset need_wait_return
 				     * and a redraw is expected because
@@ -1762,7 +1763,7 @@
      * need_wait_return after some prompt, and then outputting something
      * without scrolling
      */
-    if (msg_scrolled && !msg_scrolled_ign)
+    if (msg_scrolled != 0 && !msg_scrolled_ign)
 	need_wait_return = TRUE;
     msg_didany = TRUE;		/* remember that something was outputted */
 
@@ -1875,7 +1876,7 @@
 		/* store text for scrolling back */
 		store_sb_text(&sb_str, s, attr, &sb_col, TRUE);
 
-	    ++msg_scrolled;
+	    inc_msg_scrolled();
 	    need_wait_return = TRUE; /* may need wait_return in main() */
 	    if (must_redraw < VALID)
 		must_redraw = VALID;
@@ -1899,6 +1900,15 @@
 		if (quit_more)
 		    return;
 	    }
+
+	    /* When we displayed a char in last column need to check if there
+	     * is still more. */
+	    if (*s >= ' '
+#ifdef FEAT_RIGHTLEFT
+		    && !cmdmsg_rl
+#endif
+	       )
+		continue;
 	}
 
 	wrap = *s == '\n'
@@ -2044,6 +2054,41 @@
 }
 
 /*
+ * Increment "msg_scrolled".
+ */
+    static void
+inc_msg_scrolled()
+{
+#ifdef FEAT_EVAL
+    if (*get_vim_var_str(VV_SCROLLSTART) == NUL)
+    {
+	char_u	    *p = sourcing_name;
+	char_u	    *tofree = NULL;
+	int	    len;
+
+	/* v:scrollstart is empty, set it to the script/function name and line
+	 * number */
+	if (p == NULL)
+	    p = (char_u *)_("Unknown");
+	else
+	{
+	    len = STRLEN(p) + 40;
+	    tofree = alloc(len);
+	    if (tofree != NULL)
+	    {
+		vim_snprintf((char *)tofree, len, _("%s line %ld"),
+						      p, (long)sourcing_lnum);
+		p = tofree;
+	    }
+	}
+	set_vim_var_string(VV_SCROLLSTART, p, -1);
+	vim_free(tofree);
+    }
+#endif
+    ++msg_scrolled;
+}
+
+/*
  * To be able to scroll back at the "more" and "hit-enter" prompts we need to
  * store the displayed text and remember where screen lines start.
  */
@@ -2527,7 +2572,7 @@
 		{
 		    /* scroll up, display line at bottom */
 		    msg_scroll_up();
-		    ++msg_scrolled;
+		    inc_msg_scrolled();
 		    screen_fill((int)Rows - 2, (int)Rows - 1, 0,
 						   (int)Columns, ' ', ' ', 0);
 		    mp_last = disp_sb_line((int)Rows - 2, mp_last);
diff --git a/src/normal.c b/src/normal.c
index 1e645e4..73c4cfd 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3984,14 +3984,15 @@
     {
 	setpcmark();			/* Set in findpar() otherwise */
 	curwin->w_cursor.lnum = 1;
+	par_pos = curwin->w_cursor;
     }
     else
     {
+	par_pos = curwin->w_cursor;
 	while (curwin->w_cursor.lnum > 1 && *skipwhite(ml_get_curline()) != NUL)
 	    --curwin->w_cursor.lnum;
     }
     curwin->w_cursor.col = 0;
-    par_pos = curwin->w_cursor;
 
     /* Search forward for the identifier, ignore comment lines. */
     found_pos.lnum = 0;
diff --git a/src/proto.h b/src/proto.h
index 6116578..490f969 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -143,6 +143,7 @@
 # include "normal.pro"
 # include "ops.pro"
 # include "option.pro"
+# include "popupmenu.pro"
 # include "quickfix.pro"
 # include "regexp.pro"
 # include "screen.pro"
@@ -243,7 +244,7 @@
 # endif
 
 /*
- * The perl include files pollute the namespace, therfore proto.h must be
+ * The perl include files pollute the namespace, therefore proto.h must be
  * included before the perl include files.  But then CV is not defined, which
  * is used in if_perl.pro.  To get around this, the perl prototype files are
  * not included here for the perl files.  Use a dummy define for CV for the
diff --git a/src/spell.c b/src/spell.c
index be5dc95..d65be90 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -10035,19 +10035,38 @@
 		    sp->ts_state = STATE_FINAL;
 		    break;
 		}
+
+		/* Don't swap if the first character is not a word character.
+		 * SWAP3 etc. also don't make sense then. */
+		if (!spell_iswordp(p, curbuf))
+		{
+		    sp->ts_state = STATE_REP_INI;
+		    break;
+		}
+
 #ifdef FEAT_MBYTE
 		if (has_mbyte)
 		{
 		    n = mb_cptr2len(p);
 		    c = mb_ptr2char(p);
-		    c2 = mb_ptr2char(p + n);
+		    if (!spell_iswordp(p + n, curbuf))
+			c2 = c; /* don't swap non-word char */
+		    else
+			c2 = mb_ptr2char(p + n);
 		}
 		else
 #endif
-		    c2 = p[1];
+		{
+		    if (!spell_iswordp(p + 1, curbuf))
+			c2 = c; /* don't swap non-word char */
+		    else
+			c2 = p[1];
+		}
+
+		/* When characters are identical, swap won't do anything.
+		 * Also get here if the second char is not a word character. */
 		if (c == c2)
 		{
-		    /* Characters are identical, swap won't do anything. */
 		    sp->ts_state = STATE_SWAP3;
 		    break;
 		}
@@ -10107,20 +10126,28 @@
 		    c = mb_ptr2char(p);
 		    fl = mb_cptr2len(p + n);
 		    c2 = mb_ptr2char(p + n);
-		    c3 = mb_ptr2char(p + n + fl);
+		    if (!spell_iswordp(p + n + fl, curbuf))
+			c3 = c;	/* don't swap non-word char */
+		    else
+			c3 = mb_ptr2char(p + n + fl);
 		}
 		else
 #endif
 		{
 		    c = *p;
 		    c2 = p[1];
-		    c3 = p[2];
+		    if (!spell_iswordp(p + 2, curbuf))
+			c3 = c;	/* don't swap non-word char */
+		    else
+			c3 = p[2];
 		}
 
 		/* When characters are identical: "121" then SWAP3 result is
 		 * identical, ROT3L result is same as SWAP: "211", ROT3L
 		 * result is same as SWAP on next char: "112".  Thus skip all
-		 * swapping.  Also skip when c3 is NUL.  */
+		 * swapping.  Also skip when c3 is NUL.
+		 * Also get here when the third character is not a word
+		 * character.  Second character may any char: "a.b" -> "b.a" */
 		if (c == c3 || c3 == NUL)
 		{
 		    sp->ts_state = STATE_REP_INI;
@@ -10165,6 +10192,7 @@
 		    mch_memmove(p + fl + tl, p, n);
 		    mb_char2bytes(c, p);
 		    mb_char2bytes(c2, p + tl);
+		    p = p + tl;
 		}
 		else
 #endif
@@ -10172,6 +10200,16 @@
 		    c = *p;
 		    *p = p[2];
 		    p[2] = c;
+		    ++p;
+		}
+
+		if (!spell_iswordp(p, curbuf))
+		{
+		    /* Middle char is not a word char, skip the rotate.
+		     * First and third char were already checked at swap
+		     * and swap3. */
+		    sp->ts_state = STATE_REP_INI;
+		    break;
 		}
 
 		/* Rotate three characters left: "123" -> "231".  We change
diff --git a/src/vim.h b/src/vim.h
index 9c420a0..d00f844 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1150,13 +1150,19 @@
     , HLF_SPC	    /* SpellCap */
     , HLF_SPR	    /* SpellRare */
     , HLF_SPL	    /* SpellLocal */
+    , HLF_PNI	    /* popup menu normal item */
+    , HLF_PSI	    /* popup menu selected item */
+    , HLF_PSB	    /* popup menu scrollbar */
+    , HLF_PST	    /* popup menu scrollbar thumb */
     , HLF_COUNT	    /* MUST be the last one */
 } hlf_T;
 
 /* the HL_FLAGS must be in the same order as the HLF_ enums! */
 #define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
 		  'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
-		  'f', 'F', 'A', 'C', 'D', 'T', '>', 'B', 'P', 'R', 'L'}
+		  'f', 'F', 'A', 'C', 'D', 'T', '>', \
+		  'B', 'P', 'R', 'L', \
+		  '+', '=', 'x', 'X'}
 
 /*
  * Boolean constants
@@ -1566,7 +1572,8 @@
 #define VV_BEVAL_LNUM	41
 #define VV_BEVAL_COL	42
 #define VV_BEVAL_TEXT	43
-#define VV_LEN		44	/* number of v: vars */
+#define VV_SCROLLSTART	44
+#define VV_LEN		45	/* number of v: vars */
 
 #ifdef FEAT_CLIPBOARD