diff src/normal.c @ 6631:e527af42e108 v7.4.641

updated for version 7.4.641 Problem: The tabline menu was using ":999tabnew" which is now invalid. Solution: Use ":$tabnew" instead. (Florian Degner)
author Bram Moolenaar <bram@vim.org>
date Fri, 27 Feb 2015 15:03:58 +0100
parents 578c16fbab66
children 950e24f26ef8
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -5302,15 +5302,25 @@ handle_tabmenu()
 	    break;
 
 	case TABLINE_MENU_NEW:
-	    vim_snprintf((char *)IObuff, IOSIZE, "%dtabnew",
-				     current_tab > 0 ? current_tab - 1 : 999);
-	    do_cmdline_cmd(IObuff);
+	    if (current_tab == 0)
+		do_cmdline_cmd((char_u *)"$tabnew");
+	    else
+	    {
+		vim_snprintf((char *)IObuff, IOSIZE, "%dtabnew",
+							     current_tab - 1);
+		do_cmdline_cmd(IObuff);
+	    }
 	    break;
 
 	case TABLINE_MENU_OPEN:
-	    vim_snprintf((char *)IObuff, IOSIZE, "browse %dtabnew",
-				     current_tab > 0 ? current_tab - 1 : 999);
-	    do_cmdline_cmd(IObuff);
+	    if (current_tab == 0)
+		do_cmdline_cmd((char_u *)"browse $tabnew");
+	    else
+	    {
+		vim_snprintf((char *)IObuff, IOSIZE, "browse %dtabnew",
+							     current_tab - 1);
+		do_cmdline_cmd(IObuff);
+	    }
 	    break;
     }
 }