# HG changeset patch # User vimboss # Date 1184688936 0 # Node ID eb57516376d4b43889fe43594048f183af15c31e # Parent 45bae37de0373ed58d6f4ed8721d594ae322782d updated for version 7.1-032 diff --git a/src/ex_getln.c b/src/ex_getln.c --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -484,7 +484,8 @@ getcmdline(firstc, count, indent) if (xpc.xp_context == EXPAND_MENUNAMES && p_wmnu) { /* Hitting after "emenu Name.": complete submenu */ - if (ccline.cmdbuff[ccline.cmdpos - 1] == '.' && c == K_DOWN) + if (c == K_DOWN && ccline.cmdpos > 0 + && ccline.cmdbuff[ccline.cmdpos - 1] == '.') c = p_wc; else if (c == K_UP) { @@ -533,9 +534,11 @@ getcmdline(firstc, count, indent) upseg[3] = PATHSEP; upseg[4] = NUL; - if (ccline.cmdbuff[ccline.cmdpos - 1] == PATHSEP - && c == K_DOWN - && (ccline.cmdbuff[ccline.cmdpos - 2] != '.' + if (c == K_DOWN + && ccline.cmdpos > 0 + && ccline.cmdbuff[ccline.cmdpos - 1] == PATHSEP + && (ccline.cmdpos < 3 + || ccline.cmdbuff[ccline.cmdpos - 2] != '.' || ccline.cmdbuff[ccline.cmdpos - 3] != '.')) { /* go down a directory */ @@ -730,8 +733,8 @@ getcmdline(firstc, count, indent) /* In Ex mode a backslash escapes a newline. */ if (exmode_active && c != ESC + && ccline.cmdpos == ccline.cmdlen && ccline.cmdpos > 0 - && ccline.cmdpos == ccline.cmdlen && ccline.cmdbuff[ccline.cmdpos - 1] == '\\') { if (c == K_KENTER) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 32, +/**/ 31, /**/ 30,