vim | 28 May 05:59 2015

Issue 369 in vim: Crypt method blowfish corrupts large files in 7.4. Okay in 7.3.

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 369 by stlee... <at> gmail.com: Crypt method blowfish corrupts large  
files in 7.4.  Okay in 7.3.
https://code.google.com/p/vim/issues/detail?id=369

What steps will reproduce the problem?
1. Create a large file (e.g. 2 MB file).  You can use the num.txt.gz  
attachment but gunzip it first.

2. Use vim to load num.txt and configure these settings.
set cm=blowfish
set key=num
w num2.txt

3. Use vim to load num2.txt.  Enter "num" for the password.  Go to the end  
of the file.  The file is corrupted.

What is the expected output? What do you see instead?
It should show the original file contents.

What version of the product are you using? On what operating system?
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:33:40)

This was on a Windows 8.1 machine, but it happens on Mac and Linux as well.
Vim 7.3.46 does not have this problem.  Using crypt method zip does not  
have this problem.

(Continue reading)

Scott Prager | 26 May 20:25 2015
Picon

Add a "grepfile()" function?

Hi, I wrote this function for neovim. Please see the link below for the rationale and implementation. It's
still a work in progress, but I thought it'd be good to post here to get a wider range of feedback. Obviously,
I think this function would be useful in vim, too.

Short version: It's like "readfile()", but uses 'grepprg' to filter the output. Also enables the use of
:vimgrep without clobbering one's quickfix list.

https://github.com/neovim/neovim/pull/2742

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
vim | 26 May 14:38 2015

Issue 368 in vim: Temporary file creation non-comprehensively fails when all the variations are taken for the name

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 368 by lpapp.b... <at> gmail.com: Temporary file creation  
non-comprehensively fails when all the variations are taken for the name
https://code.google.com/p/vim/issues/detail?id=368

I am always getting this even if I remove that file: E138: Can't write  
viminfo file /home/lpapp/.viminfo!

After a lot of fiddling with chmod/chown/rm as suggested by some Google  
search results, I noticed that they had not helped me with this. Thereby, I  
went for running vim through strace!

I do not know why, but I ended up having the following files:

-rw-r--r-- 1 lpapp admin     0 May 22 18:48 /home/lpapp/.viminfa.tmp
-rw------- 1 lpapp admin 22541 May 15 18:00 /home/lpapp/.viminfb.tmp
-rw------- 1 lpapp admin     0 May 20 18:47 /home/lpapp/.viminfc.tmp
-rw------- 1 lpapp admin 12288 May 12 20:04 /home/lpapp/.viminfd.tmp
-rw------- 1 lpapp admin 20480 May 12 20:04 /home/lpapp/.viminfe.tmp
-rw------- 1 lpapp admin     0 May  1 19:41 /home/lpapp/.viminff.tmp
-rw------- 1 lpapp admin 16384 Apr 13 11:23 /home/lpapp/.viminfg.tmp
-rw------- 1 lpapp admin     0 Apr 13 11:23 /home/lpapp/.viminfh.tmp
-rw------- 1 lpapp admin     0 Apr  2 20:38 /home/lpapp/.viminfi.tmp
-rw------- 1 lpapp admin     0 Mar  6 12:23 /home/lpapp/.viminfj.tmp
-rw------- 1 lpapp admin     0 Mar  4 20:32 /home/lpapp/.viminfk.tmp
-rw------- 1 lpapp admin 12428 Mar  4 11:28 /home/lpapp/.viminfl.tmp
-rw------- 1 lpapp admin     0 Mar  3 19:00 /home/lpapp/.viminfm.tmp
(Continue reading)

Thomson | 25 May 04:58 2015
Picon

Fix an incorrect comment in peekchr

Hi vim-dev,

There seems an incorrect comment in peekchar(), ^ and \$ are magic
only after \V (very no-magic mode), not \v (very magic mode). See the
patch below. Thanks.

--- a/src/regexp.c
+++ b/src/regexp.c
 <at>  <at>  -3156,7 +3156,7  <at>  <at>  peekchr()
                    /*
                     * META contains everything that may be magic sometimes,
                     * except ^ and $ ("\^" and "\$" are only magic after
-                    * "\v").  We now fetch the next character and toggle its
+                    * "\V").  We now fetch the next character and toggle its
                     * magicness.  Therefore, \ is so meta-magic that it is
                     * not in META.
                     */

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

(Continue reading)

Thomson Tan | 25 May 04:48 2015
Picon

Patch: Fix an incorrect comment in peekchr()

Hi,
Seems there is an incorrect comment in peekchr(). ^ and \$ are magic only after \V (very no-magic mode), not
\v (very magic mode). See the patch below. Thanks.

--- a/src/regexp.c
+++ b/src/regexp.c
 <at>  <at>  -3156,7 +3156,7  <at>  <at>  peekchr()
                    /*
                     * META contains everything that may be magic sometimes,
                     * except ^ and $ ("\^" and "\$" are only magic after
-                    * "\v").  We now fetch the next character and toggle its
+                    * "\V").  We now fetch the next character and toggle its
                     * magicness.  Therefore, \ is so meta-magic that it is
                     * not in META.
                     */

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
mattn | 25 May 06:15 2015
Picon

vim.exe doesn't restore wide characters in cmd.exe

http://go-gyazo.appspot.com/07b65df3b2cdd94b.png

Since vim.exe uses ReadConsoleOutputA/WriteConsoleOutputA, wide characters are not remained on
cmd.exe after exiting. Below is a patch to fix this.
On win9x, ReadConsoleOutputW/WriteConsoleOutputW doesn't work correctly, this patch check the OS is NT
or later.

https://gist.github.com/mattn/5aed3a57d3995e31a377

- mattn

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
petr.vorel | 24 May 15:17 2015
Picon

Kconfig plugin orphaned

Hi there,

Nikolai Weibull, the original author of Kconfig plugin wrote me (and Bram in CC) that he no longer has time to
maintain it anymore, so community should take over maintainership. Anyone interesting to adopt it?
He/she could start with my patch [2] :-).

I got in touch with Nikolai as I wanted him to add support for matchit plugin into Kconfig [1].

Kind regards,
Petr

[1] https://groups.google.com/forum/#!searchin/vim_dev/kconfig/vim_dev/mBeq83NFOg0/bjiuBtewDBAJ
[2] https://12985092515833507022.googlegroups.com/attach/100cb0d706ae386e/kconfig.vim-support-for-matchit.patch?part=0.1&view=1&vt=ANaJVrGdI0Bwozc5EYJTBqvmAsMPGXCYxvatUIoq6W-iZ8upyBkN-yHChGPTXFe5sQhdkzY-JpnCMDWtOfsgeVQmuKTxoj82M1_VsULyUUyixbwQBPZTlA0

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Bram Moolenaar | 24 May 13:36 2015
Picon
Picon

Re: [vim] Recognize RTEXT in addition to LTEXT and CTEXT in .rc syntax. (#360)


Someone wrote:

> For some reason only `LTEXT` and `CTEXT` were recognized as controls, but `RTEXT` was not.
> 
> Add it too for consistency.
> You can view, comment on, or merge this pull request online at:
> 
>   https://github.com/vim/vim/pull/360
> 
> -- Commit Summary --
> 
>   * Recognize RTEXT in addition to LTEXT and CTEXT in .rc syntax.

Please send this to the maintainer of the file, Heiko Erhardt.

-- 
hundred-and-one symptoms of being an internet addict:
47. You are so familiar with the WWW that you find the search engines useless.

 /// Bram Moolenaar -- Bram <at> Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
(Continue reading)

Dominique Pellé | 23 May 23:29 2015
Picon

[bug] invalid memory access in vim-7.4.729 in regexp.c with zero-width \ <at> <=

Hi

Vim-7.4.729 accesses invalid memory (global overflow) when doing:

$ vim -u NONE -c 'set re=1' \
  -c 'e ++enc=utf8 ++bad=keep crash-5' \
  -c 'call search(getline("."))'

... where crash-5 is the attached file (8 bytes).

Asan reports:

==5792==ERROR: AddressSanitizer: global-buffer-overflow on address
0x0000011f58e7 at pc 0xafd150 bp 0x7ffcc79a6ee0 sp 0x7ffcc79a6ed8
READ of size 1 at 0x0000011f58e7 thread T0
    #0 0xafd14f in utf_head_off /home/pel/sb/vim/src/mbyte.c:3514
    #1 0xd978ad in regmatch /home/pel/sb/vim/src/regexp.c:5588
    #2 0xd978ad in regtry /home/pel/sb/vim/src/regexp.c:4099
    #3 0xd9d845 in bt_regexec_both /home/pel/sb/vim/src/regexp.c:3988
    #4 0xdc439a in vim_regexec_multi /home/pel/sb/vim/src/regexp.c:8275
    #5 0xe87449 in searchit /home/pel/sb/vim/src/search.c:639
    #6 0x593533 in search_cmn /home/pel/sb/vim/src/eval.c:16366
    #7 0x593533 in f_search /home/pel/sb/vim/src/eval.c:16516
    #8 0x611d47 in call_func /home/pel/sb/vim/src/eval.c:8765
    #9 0x63e3dc in get_func_tv /home/pel/sb/vim/src/eval.c:8565
    #10 0x65ac39 in ex_call /home/pel/sb/vim/src/eval.c:3510
    #11 0x75aa1d in do_one_cmd /home/pel/sb/vim/src/ex_docmd.c:2940
    #12 0x77016d in do_cmdline /home/pel/sb/vim/src/ex_docmd.c:1133
    #13 0x4237c6 in exe_commands /home/pel/sb/vim/src/main.c:2922
    #14 0x4237c6 in main /home/pel/sb/vim/src/main.c:958
(Continue reading)

Yukihiro Nakadaira | 23 May 03:05 2015
Picon

v_p split line at unexpected place when replacing last character with line register.

v_p split line at unexpected place when replacing last character with line
register.

Steps to reproduce:

  $ vim -u NONE
  iaaa
  bbb
  ccc<Esc>ggYj$vp

Result:

  1 aaa
  2 b
  3 aaa
  4 b
  5 ccc

Expected:

  1 aaa
  2 bb
  3 aaa
  4
  5 ccc

I wrote patch for this problem.  Please check the attached patch.

With this patch, this command

  $ vim -u NONE
  iaaa
  bbb
  ccc<Esc>ggYG$v$p

results

  1 aaa
  2 bbb
  3 cc
  4 aaa
  5 [empty line]

I'm not sure the empty line should be appended or not when newline is selected
at last line.

--
Yukihiro Nakadaira - yukihiro.nakadaira <at> gmail.com

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r 18d84ed365a5 src/ops.c
--- a/src/ops.c	Wed Apr 22 22:18:22 2015 +0200
+++ b/src/ops.c	Sat May 23 09:53:11 2015 +0900
 <at>  <at>  -3488,17 +3488,26  <at>  <at> 
     {
 	if (flags & PUT_LINE_SPLIT)
 	{
+	    char_u *p;
+
 	    /* "p" or "P" in Visual mode: split the lines to put the text in
 	     * between. */
 	    if (u_save_cursor() == FAIL)
 		goto end;
-	    ptr = vim_strsave(ml_get_cursor());
+	    p = ml_get_cursor();
+	    if (dir == FORWARD && *p != NUL)
+		mb_ptr_adv(p);
+	    ptr = vim_strsave(p);
 	    if (ptr == NULL)
 		goto end;
 	    ml_append(curwin->w_cursor.lnum, ptr, (colnr_T)0, FALSE);
 	    vim_free(ptr);

-	    ptr = vim_strnsave(ml_get_curline(), curwin->w_cursor.col);
+	    oldp = ml_get_curline();
+	    p = oldp + curwin->w_cursor.col;
+	    if (dir == FORWARD && *p != NUL)
+		mb_ptr_adv(p);
+	    ptr = vim_strnsave(oldp, p - oldp);
 	    if (ptr == NULL)
 		goto end;
 	    ml_replace(curwin->w_cursor.lnum, ptr, FALSE);
diff -r 18d84ed365a5 src/testdir/test94.in
--- a/src/testdir/test94.in	Wed Apr 22 22:18:22 2015 +0200
+++ b/src/testdir/test94.in	Sat May 23 09:53:11 2015 +0900
 <at>  <at>  -64,6 +64,42  <at>  <at> 
 d:
:set ma | put = v:errmsg =~# '^E21' ? 'ok' : 'failed'
 dv:dV::set noma | let v:errmsg = ''
 d::set ma | put = v:errmsg =~# '^E21' ? 'failed' : 'ok'
+:
+:$put =''
+:$put ='v_p: replace last character with line register at middle line'
+:$put ='aaa'
+:$put ='bbb'
+:$put ='ccc'
+:-2yank
+k$vp
+:$put ='---'
+:
+:$put =''
+:$put ='v_p: replace last character with line register at middle line selecting newline'
+:$put ='aaa'
+:$put ='bbb'
+:$put ='ccc'
+:-2yank
+k$v$p
+:$put ='---'
+:
+:$put =''
+:$put ='v_p: replace last character with line register at last line'
+:$put ='aaa'
+:$put ='bbb'
+:$put ='ccc'
+:-2yank
+$vp
+:$put ='---'
+:
+:$put =''
+:$put ='v_p: replace last character with line register at last line selecting newline'
+:$put ='aaa'
+:$put ='bbb'
+:$put ='ccc'
+:-2yank
+$v$p
+:$put ='---'
 :/^start:/+2,$w! test.out
 :q!
 ENDTEST
diff -r 18d84ed365a5 src/testdir/test94.ok
--- a/src/testdir/test94.ok	Wed Apr 22 22:18:22 2015 +0200
+++ b/src/testdir/test94.ok	Sat May 23 09:53:11 2015 +0900
 <at>  <at>  -18,3 +18,34  <at>  <at> 
 zzz
 ok
 ok
+
+v_p: replace last character with line register at middle line
+aaa
+bb
+aaa
+
+ccc
+---
+
+v_p: replace last character with line register at middle line selecting newline
+aaa
+bb
+aaa
+ccc
+---
+
+v_p: replace last character with line register at last line
+aaa
+bbb
+cc
+aaa
+
+---
+
+v_p: replace last character with line register at last line selecting newline
+aaa
+bbb
+cc
+aaa
+
+---
Carlo Baldassi | 23 May 01:42 2015
Picon

patch to allow locking/unlocking the jump list

Hi,

First, my use case: I'd like to be able to invoke functions or commands (particularly some which I didn't
write, e.g. from other people plug-ins/scripts) and not have them update the jump list. The "keepjumps"
command is not sufficient in this regard, because it does not act recursively.

For example, I have some code[1] which uses the matchit.vim plugin, which:
1) doesn't use keepjumps internally (this may be seen as a plugin bug, and I sent a patch[2] to the author to do that).
2) calls m' on the starting position before jumping to its destination[3]. This is not a bug and it's
currently unavoidable.

My code calls "normal %" in the middle of some processing, and this inevitably pollutes the jump list, so
that using CTRL-O jumps to irrelevant places in the file. Also, my code in turn sets jumps, and people might
want to use it without that being the case. You get the idea.

I know I should have tried not to introduce new options ;) but it seems to me that having an option to lock the
jump list (and restoring it afterwards) is the simplest way to introduce a mechanism to avoid that
behaviour. I mean not only simple to implement, but also to document, understand, and maintain. My patch
adds such an option, called 'lockjumps' or 'lkj'. It's a window option since the jumplist is also
associated to the window.

I tested it and it works as intended, and valgrind passes. When I removed the `FEAT_JUMPLIST` setting in
features.h, it compiled and worked fine; two tests failed (test49 and test_command_count) but this is
unrelated to the patch since they failed anyway with that setting disabled.

The patch is against the latest code downloaded today with mercurial (ca3db36a6ed8).

I followed the instructions in option.c, but I never worked on the vim source code before so please let me
know if I should do something more, or if I overlooked something etc.

Carlo

[1] example: https://github.com/JuliaLang/julia-vim/blob/9bb84c2f3586c8d6f1263254ae21bb16a66abb4a/autoload/julia_blocks.vim#L319
[2] https://github.com/benjifisher/matchit.zip/pull/2
[3] example: https://github.com/benjifisher/matchit.zip/blob/73f7f7051eca95ed90537f931e9a4559fb3a494b/plugin/matchit.vim#L277

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
 <at>  <at>  -1084,7 +1084,8  <at>  <at> 
 only once.

 When the |:keepjumps| command modifier is used, jumps are not stored in the
-jumplist.  Jumps are also not stored in other cases, e.g., in a |:global|
+jumplist. When set, the |'lockjumps'| option also prevents jumps from being
+stored. Jumps are also not stored in other cases, e.g., in a |:global|
 command.  You can explicitly add a jump by setting the ' mark with "m'".  Note
 that calling setpos() does not do this.

diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
 <at>  <at>  -4772,6 +4772,15  <at>  <at> 
 	Note that using the "-u NONE" and "--noplugin" command line arguments
 	reset this option. |-u| |--noplugin|

+				*'lockjumps'* *'lkj'* *'nolockjumps'* *'nolkj'*
+'lockjumps' 'lkj'	boolean	(default off)
+			local to window
+			{not in Vi}
+			{only available when compiled without the |+jumplist|
+			feature}
+	When this option is set, the jump list will not be updated by jump
+	commands. See |:jumps| and |jumplist|.
+
 						*'macatsui'* *'nomacatsui'*
 'macatsui'		boolean	(default on)
 			global
diff --git a/runtime/doc/tags b/runtime/doc/tags
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
 <at>  <at>  -404,10 +404,12  <at>  <at> 
 'lispwords'	options.txt	/*'lispwords'*
 'list'	options.txt	/*'list'*
 'listchars'	options.txt	/*'listchars'*
+'lkj'	options.txt	/*'lkj'*
 'lm'	options.txt	/*'lm'*
 'lmap'	options.txt	/*'lmap'*
 'lnr'	options.txt	/*'lnr'*
 'loadplugins'	options.txt	/*'loadplugins'*
+'lockjumps'	options.txt	/*'lockjumps'*
 'lpl'	options.txt	/*'lpl'*
 'ls'	options.txt	/*'ls'*
 'lsp'	options.txt	/*'lsp'*
 <at>  <at>  -574,7 +576,9  <at>  <at> 
 'nolinebreak'	options.txt	/*'nolinebreak'*
 'nolisp'	options.txt	/*'nolisp'*
 'nolist'	options.txt	/*'nolist'*
+'nolkj'	options.txt	/*'nolkj'*
 'noloadplugins'	options.txt	/*'noloadplugins'*
+'nolockjumps'	options.txt	/*'nolockjumps'*
 'nolpl'	options.txt	/*'nolpl'*
 'nolz'	options.txt	/*'nolz'*
 'noma'	options.txt	/*'noma'*
 <at>  <at>  -6733,6 +6737,7  <at>  <at> 
 lcs-extends	options.txt	/*lcs-extends*
 lcs-nbsp	options.txt	/*lcs-nbsp*
 lcs-precedes	options.txt	/*lcs-precedes*
+lcs-space	options.txt	/*lcs-space*
 lcs-tab	options.txt	/*lcs-tab*
 lcs-trail	options.txt	/*lcs-trail*
 left-right-motions	motion.txt	/*left-right-motions*
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
 <at>  <at>  -239,6 +239,9  <at>  <at> 
 call append("$", "startofline\tmany jump commands move the cursor to the first non-blank")
 call append("$", "\tcharacter of a line")
 call <SID>BinOptionG("sol", &sol)
+call append("$", "lockjumps\tdon't record jumps in the jumplist")
+call append("$", "\t(local to window)")
+call <SID>BinOptionL("lkj")
 call append("$", "paragraphs\tnroff macro names that separate paragraphs")
 call <SID>OptionG("para", &para)
 call append("$", "sections\tnroff macro names that separate sections")
diff --git a/src/edit.c b/src/edit.c
--- a/src/edit.c
+++ b/src/edit.c
 <at>  <at>  -8439,7 +8439,11  <at>  <at> 
 	curwin->w_set_curswant = TRUE;

     /* Remember the last Insert position in the '^ mark. */
-    if (!cmdmod.keepjumps)
+    if (!cmdmod.keepjumps
+/*#ifdef FEAT_JUMPLIST
+	    && !curwin->w_p_lkj
+#endif*/
+       )
 	curbuf->b_last_insert = curwin->w_cursor;

     /*
diff --git a/src/mark.c b/src/mark.c
--- a/src/mark.c
+++ b/src/mark.c
 <at>  <at>  -149,7 +149,11  <at>  <at> 
 #endif

     /* for :global the mark is set only once */
-    if (global_busy || listcmd_busy || cmdmod.keepjumps)
+    if (global_busy || listcmd_busy || cmdmod.keepjumps
+/*#ifdef FEAT_JUMPLIST
+	    || curwin->w_p_lkj
+#endif*/
+	    )
 	return;

     curwin->w_prev_pcmark = curwin->w_pcmark;
diff --git a/src/misc1.c b/src/misc1.c
--- a/src/misc1.c
+++ b/src/misc1.c
 <at>  <at>  -3032,7 +3032,11  <at>  <at> 
     changed();

     /* set the '. mark */
-    if (!cmdmod.keepjumps)
+    if (!cmdmod.keepjumps
+/*#ifdef FEAT_JUMPLIST
+	    && !curwin->w_p_lkj
+#endif*/
+	    )
     {
 	curbuf->b_last_change.lnum = lnum;
 	curbuf->b_last_change.col = col;
diff --git a/src/option.c b/src/option.c
--- a/src/option.c
+++ b/src/option.c
 <at>  <at>  -213,6 +213,9  <at>  <at> 
 #ifdef FEAT_LINEBREAK
 # define PV_LBR		OPT_WIN(WV_LBR)
 #endif
+#ifdef FEAT_JUMPLIST
+# define PV_LKJ         OPT_WIN(WV_LKJ)
+#endif
 #define PV_NU		OPT_WIN(WV_NU)
 #define PV_RNU		OPT_WIN(WV_RNU)
 #ifdef FEAT_LINEBREAK
 <at>  <at>  -1761,6 +1764,13  <at>  <at> 
     {"loadplugins", "lpl",  P_BOOL|P_VI_DEF,
 			    (char_u *)&p_lpl, PV_NONE,
 			    {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+    {"lockjumps",   "lkj",  P_BOOL|P_VI_DEF,
+#ifdef FEAT_JUMPLIST
+			    (char_u *)VAR_WIN, PV_LKJ,
+#else
+			    (char_u *)NULL, PV_NONE,
+#endif
+			    {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
 #ifdef FEAT_GUI_MAC
     {"macatsui",    NULL,   P_BOOL|P_VI_DEF|P_RCLR,
 			    (char_u *)&p_macatsui, PV_NONE,
 <at>  <at>  -10113,6 +10123,9  <at>  <at> 
 	case PV_BRI:	return (char_u *)&(curwin->w_p_bri);
 	case PV_BRIOPT: return (char_u *)&(curwin->w_p_briopt);
 #endif
+#ifdef FEAT_JUMPLIST
+	case PV_LKJ:	return (char_u *)&(curwin->w_p_lkj);
+#endif
 #ifdef FEAT_SCROLLBIND
 	case PV_SCBIND: return (char_u *)&(curwin->w_p_scb);
 #endif
 <at>  <at>  -10307,6 +10320,9  <at>  <at> 
     to->wo_bri = from->wo_bri;
     to->wo_briopt = vim_strsave(from->wo_briopt);
 #endif
+#ifdef FEAT_JUMPLIST
+    to->wo_lkj = from->wo_lkj;
+#endif
 #ifdef FEAT_SCROLLBIND
     to->wo_scb = from->wo_scb;
     to->wo_scb_save = from->wo_scb_save;
diff --git a/src/option.h b/src/option.h
--- a/src/option.h
+++ b/src/option.h
 <at>  <at>  -1083,6 +1083,9  <at>  <at> 
 #ifdef FEAT_LINEBREAK
     , WV_LBR
 #endif
+#ifdef FEAT_JUMPLIST
+    , WV_LKJ
+#endif
     , WV_NU
     , WV_RNU
 #ifdef FEAT_LINEBREAK
diff --git a/src/structs.h b/src/structs.h
--- a/src/structs.h
+++ b/src/structs.h
 <at>  <at>  -180,6 +180,10  <at>  <at> 
     int		wo_lbr;
 # define w_p_lbr w_onebuf_opt.wo_lbr	/* 'linebreak' */
 #endif
+#ifdef FEAT_JUMPLIST
+    int		wo_lkj;
+# define w_p_lkj w_onebuf_opt.wo_lkj	/* 'linebreak' */
+#endif
     int		wo_list;
 #define w_p_list w_onebuf_opt.wo_list	/* 'list' */
     int		wo_nu;

Gmane