Patch 8.2.2499
Problem: "vim -g --version" does not redirect output.
Solution: Reset gui.starting when showing version info. (closes #7815)
Files: src/main.c, src/testdir/test_version.vim
*** ../vim-8.2.2498/src/main.c 2020-12-28 18:25:56.796886014 +0100
--- src/main.c 2021-02-11 19:07:34.991992229 +0100
***************
*** 1979,1984 ****
--- 1979,1985 ----
{
Columns = 80; // need to init Columns
info_message = TRUE; // use mch_msg(), not mch_errmsg()
+ gui.starting = FALSE; // not starting GUI, will exit
list_version();
msg_putchar('\n');
msg_didout = FALSE;
*** ../vim-8.2.2498/src/testdir/test_version.vim 2020-08-12
18:50:31.887655765 +0200
--- src/testdir/test_version.vim 2021-02-11 19:06:57.452085537 +0100
***************
*** 1,5 ****
--- 1,8 ----
" Test :version Ex command
+ so check.vim
+ so shared.vim
+
func Test_version()
" version should always return the same string.
let v1 = execute('version')
***************
*** 9,12 ****
--- 12,26 ----
call assert_match("^\n\nVIM - Vi IMproved .*", v1)
endfunc
+ func Test_version_redirect()
+ CheckNotGui
+ CheckCanRunGui
+ CheckUnix
+
+ call RunVim([], [], '--clean -g --version >Xversion 2>&1')
+ call assert_match('Features included', readfile('Xversion')->join())
+
+ call delete('Xversion')
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.2498/src/version.c 2021-02-11 18:36:27.584202581 +0100
--- src/version.c 2021-02-11 18:58:39.609285730 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2499,
/**/
--
ARTHUR: Then who is your lord?
WOMAN: We don't have a lord.
ARTHUR: What?
DENNIS: I told you. We're an anarcho-syndicalist commune. We take it in
turns to act as a sort of executive officer for the week.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- 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
---
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202102111809.11BI97UO659359%40masaka.moolenaar.net.