Hi Bram and Vim developers.

How to reproduce:
- start vim
  $ vim -N -u NONE

- Input below.
  yy3p
  :messages<CR>


Expected behavior:
- Displayed this.
Messages maintainer: Bram Moolenaar <[email protected]>
3 more lines
Press ENTER or type command to continue


Actual behavior:
- Displayed this. It is registerd twice.
Messages maintainer: Bram Moolenaar <[email protected]>
3 more lines
3 more lines
Press ENTER or type command to continue


Investigation result:
This is a traditional bug from at least Vim7.0
`keep_msg` should not set NULL in main_loop().
Because prevent double registration check will not work in msg_attr_keep().

Attached a patch. Please check this.

Related todo list item:
> Some quickfix messages appear twice. (Gary Johnson, 2014 Feb 16)
> Patch by Christian Brabandt, 2014 Feb 17.
https://groups.google.com/d/msg/vim_dev/5To2u8_CrKE/UTrIKMf_7QAJ

My patch fixed this item too.

Thank you.
--
Best regards,
Hirohito Higashi

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r af7e1f8a52d3 src/main.c
--- a/src/main.c	Fri Aug 29 15:53:52 2014 +0200
+++ b/src/main.c	Sat Aug 30 01:02:45 2014 +0900
@@ -1243,7 +1243,6 @@
 		/* msg_attr_keep() will set keep_msg to NULL, must free the
 		 * string here. */
 		p = keep_msg;
-		keep_msg = NULL;
 		msg_attr(p, keep_msg_attr);
 		vim_free(p);
 	    }

Raspunde prin e-mail lui