diff -r 7099f98528b4 runtime/doc/motion.txt
--- a/runtime/doc/motion.txt	Fri May 31 23:18:00 2013 +0200
+++ b/runtime/doc/motion.txt	Sat Jun 01 17:55:27 2013 +0800
@@ -1095,6 +1095,24 @@
     1  1154   23 end. ~
  > ~
 
+The 'jumplist' option can adjust this behavior. If you set 'jumplist' to
+"rotate", the jump list would become:
+
+  jump line  col file/line ~
+    4  1167    0 foo bar ~
+    3	  1    0 some text ~
+    2	 70    0 another line ~
+    1  1154   23 end. ~
+ > ~
+
+And when the option is "trim", the jump list would then become:
+
+  jump line  col file/line ~
+    3  1167    0 foo bar ~
+    2	  1    0 some text ~
+    1  1154   23 end. ~
+ > ~
+
 The line numbers will be adjusted for deleted and inserted lines.  This fails
 if you stop editing a file without writing, like with ":n!".
 
diff -r 7099f98528b4 runtime/doc/options.txt
--- a/runtime/doc/options.txt	Fri May 31 23:18:00 2013 +0200
+++ b/runtime/doc/options.txt	Sat Jun 01 17:55:27 2013 +0800
@@ -4375,6 +4375,25 @@
 	Otherwise only one space is inserted.
 	NOTE: This option is set when 'compatible' is set.
 
+							*'jumplist'* *'jl'*
+'jumplist' 'jl'		string	(default: "classic")
+			global
+			{only available when compiled with the |+jumplist|
+			feature}
+			{not in Vi}
+	Specifies the behavior when a new item is added to |jumplist|.  Valid
+	values:
+
+		classic	New entries will added to the end of the jump list.
+
+		rotate	All entries from the current entry to the last will be
+			pushed to the front of the list, and then the new
+			entry is appended at the end.
+
+		trim	All entries from the current entry to the last will be
+			removed, and then the new entry is appended at the
+			end.
+
 							*'key'*
 'key'			string	(default "")
 			local to buffer
diff -r 7099f98528b4 runtime/optwin.vim
--- a/runtime/optwin.vim	Fri May 31 23:18:00 2013 +0200
+++ b/runtime/optwin.vim	Sat Jun 01 17:55:27 2013 +0800
@@ -268,6 +268,10 @@
 call <SID>OptionG("cmp", &cmp)
 call append("$", "maxmempattern\tmaximum amount of memory in Kbyte used for pattern matching")
 call append("$", " \tset mmp=" . &mmp)
+if has("jumplist")
+  call append("$", "jumplist\tbehavior while adding new entry to jumplist")
+  call <SID>OptionG("jl", &jl)
+endif
 call append("$", "define\tpattern for a macro definition line")
 call append("$", "\t(global or local to buffer)")
 call <SID>OptionG("def", &def)
diff -r 7099f98528b4 src/mark.c
--- a/src/mark.c	Fri May 31 23:18:00 2013 +0200
+++ b/src/mark.c	Sat Jun 01 17:55:27 2013 +0800
@@ -144,8 +144,6 @@
 #ifdef FEAT_JUMPLIST
     int		i;
     xfmark_T	*fm;
-#endif
-#ifdef JUMPLIST_ROTATE
     xfmark_T	tempmark;
 #endif
 
@@ -157,23 +155,35 @@
     curwin->w_pcmark = curwin->w_cursor;
 
 #ifdef FEAT_JUMPLIST
-# ifdef JUMPLIST_ROTATE
-    /*
-     * If last used entry is not at the top, put it at the top by rotating
-     * the stack until it is (the newer entries will be at the bottom).
-     * Keep one entry (the last used one) at the top.
-     */
-    if (curwin->w_jumplistidx < curwin->w_jumplistlen)
-	++curwin->w_jumplistidx;
-    while (curwin->w_jumplistidx < curwin->w_jumplistlen)
+    if (*p_jl == 'r')
     {
-	tempmark = curwin->w_jumplist[curwin->w_jumplistlen - 1];
-	for (i = curwin->w_jumplistlen - 1; i > 0; --i)
-	    curwin->w_jumplist[i] = curwin->w_jumplist[i - 1];
-	curwin->w_jumplist[0] = tempmark;
-	++curwin->w_jumplistidx;
+	/*
+	 * If last used entry is not at the top, put it at the top by rotating
+	 * the stack until it is (the newer entries will be at the bottom).
+	 * Keep one entry (the last used one) at the top.
+	 */
+	/*if (curwin->w_jumplistidx < curwin->w_jumplistlen)*/
+	    /*++curwin->w_jumplistidx;*/
+	while (curwin->w_jumplistidx < curwin->w_jumplistlen)
+	{
+	    tempmark = curwin->w_jumplist[curwin->w_jumplistlen - 1];
+	    for (i = curwin->w_jumplistlen - 1; i > 0; --i)
+		curwin->w_jumplist[i] = curwin->w_jumplist[i - 1];
+	    curwin->w_jumplist[0] = tempmark;
+	    ++curwin->w_jumplistidx;
+	}
     }
-# endif
+    else if (*p_jl == 't')
+    {
+	/*if (curwin->w_jumplistidx < curwin->w_jumplistlen)*/
+	    /*++curwin->w_jumplistidx;*/
+	for (i = curwin->w_jumplistidx; i < curwin->w_jumplistlen; ++i)
+	{
+	    vim_free(curwin->w_jumplist[i].fname);
+	    curwin->w_jumplist[i].fname = NULL;
+	}
+	curwin->w_jumplistlen = curwin->w_jumplistidx;
+    }
 
     /* If jumplist is full: remove oldest entry */
     if (++curwin->w_jumplistlen > JUMPLISTSIZE)
diff -r 7099f98528b4 src/option.c
--- a/src/option.c	Fri May 31 23:18:00 2013 +0200
+++ b/src/option.c	Sat Jun 01 17:55:27 2013 +0800
@@ -1590,6 +1590,11 @@
     {"joinspaces",  "js",   P_BOOL|P_VI_DEF|P_VIM,
 			    (char_u *)&p_js, PV_NONE,
 			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+#ifdef FEAT_JUMPLIST
+    {"jumplist",    "jl",   P_STRING|P_VI_DEF,
+			    (char_u *)&p_jl, PV_NONE,
+			    {(char_u *)"classic", (char_u *)0L} SCRIPTID_INIT},
+#endif
     {"key",	    NULL,   P_STRING|P_ALLOCED|P_VI_DEF|P_NO_MKRC,
 #ifdef FEAT_CRYPT
 			    (char_u *)&p_key, PV_KEY,
@@ -2947,6 +2952,9 @@
 static char *(p_ambw_values[]) = {"single", "double", NULL};
 #endif
 static char *(p_bg_values[]) = {"light", "dark", NULL};
+#ifdef FEAT_JUMPLIST
+static char *(p_jl_values[]) = {"classic", "rotate", "trim", NULL};
+#endif
 static char *(p_nf_values[]) = {"octal", "hex", "alpha", NULL};
 static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL};
 #ifdef FEAT_CRYPT
@@ -5868,6 +5876,15 @@
 	    errmsg = e_invarg;
     }
 
+#ifdef FEAT_JUMPLIST
+    /* 'jumplist */
+    else if (varp == &p_jl)
+    {
+	if (check_opt_strings(p_jl, p_jl_values, FALSE) == FAIL)
+	    errmsg = e_invarg;
+    }
+#endif
+
     /* 'wildmode' */
     else if (varp == &p_wim)
     {
diff -r 7099f98528b4 src/option.h
--- a/src/option.h	Fri May 31 23:18:00 2013 +0200
+++ b/src/option.h	Sat Jun 01 17:55:27 2013 +0800
@@ -569,6 +569,9 @@
 EXTERN char_u	*p_isi;		/* 'isident' */
 EXTERN char_u	*p_isp;		/* 'isprint' */
 EXTERN int	p_js;		/* 'joinspaces' */
+#ifdef FEAT_JUMPLIST
+EXTERN char_u	*p_jl;		/* 'jumplist' */
+#endif
 EXTERN char_u	*p_kp;		/* 'keywordprg' */
 #ifdef FEAT_VISUAL
 EXTERN char_u	*p_km;		/* 'keymodel' */
