test failure in Test_quoteplus()

2018-03-26 Fir de Conversatie tooth pik
First run:
function RunTheTest[38]..Test_quoteplus line 35: Expected 'Yes, I can.' but
got 'Can you hear me?'
Second run:
function RunTheTest[38]..Test_quoteplus line 35: Expected 'Yes, I can.' but
got 'Can you hear me?'

anyone else getting this?

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.0.1647

2018-03-26 Fir de Conversatie Bram Moolenaar

Patch 8.0.1647
Problem:Terminal API may call a function not meant to be called by this
API.
Solution:   Require the function to start with Tapi_.
Files:  runtime/doc/terminal.txt, src/terminal.c,
src/testdir/test_terminal.vim


*** ../vim-8.0.1646/runtime/doc/terminal.txt2018-03-25 18:19:47.221066088 
+0200
--- runtime/doc/terminal.txt2018-03-26 21:25:31.372777477 +0200
***
*** 423,442 
  
call {funcname} {argument}
  
!   Call a user defined function with [argument].  The function is
!   called with the buffer number of the terminal and the decoded
!   argument.  The user function must sanity check the argument.
The function can use |term_sendkeys()| to send back a reply.
Example in JSON: >
!   ["call", "Impression", ["play", 14]]
  < Calls a function defined like this: >
!   function Impression(bufnum, arglist)
  if len(a:arglist) == 2
!   echo "impression " . a:arglist[0]
!   echo "count " . a:arglist[1]
  endif
endfunc
! <
drop {filename}
  
Let Vim open a file, like the `:drop` command.  If {filename}
--- 423,448 
  
call {funcname} {argument}
  
!   Call a user defined function with {argument}.
!   The function is called with two arguments: the buffer number
!   of the terminal and {argument}, the decoded JSON argument. 
!   The function name must start with "Tapi_" to avoid
!   accidentally calling a function not meant to be used for the
!   terminal API
!   The user function should sanity check the argument.
The function can use |term_sendkeys()| to send back a reply.
Example in JSON: >
!   ["call", "Tapi_Impression", ["play", 14]]
  < Calls a function defined like this: >
!   function Tapi_Impression(bufnum, arglist)
  if len(a:arglist) == 2
!   echomsg "impression " . a:arglist[0]
!   echomsg "count " . a:arglist[1]
  endif
endfunc
! < Output from `:echo` may be erased by a redraw, use `:echomsg`
!   to be able to see it with `:messages`.
! 
drop {filename}
  
Let Vim open a file, like the `:drop` command.  If {filename}
***
*** 447,453 
  
  A trick to have Vim send this escape sequence: >
exe "set t_ts=\]51; t_fs=\x07"
!   let  = '["call","TryThis",["hello",123]]'
redraw
set t_ts& t_fs&
  
--- 453,459 
  
  A trick to have Vim send this escape sequence: >
exe "set t_ts=\]51; t_fs=\x07"
!   let  = '["call","Tapi_TryThis",["hello",123]]'
redraw
set t_ts& t_fs&
  
*** ../vim-8.0.1646/src/terminal.c  2018-03-25 18:19:47.217066110 +0200
--- src/terminal.c  2018-03-26 21:27:30.720061009 +0200
***
*** 3193,3199 
  }
  func = get_tv_string(>li_tv);
  
! if (!ASCII_ISUPPER(*func))
  {
ch_log(channel, "Invalid function name: %s", func);
return;
--- 3193,3199 
  }
  func = get_tv_string(>li_tv);
  
! if (STRNCMP(func, "Tapi_", 5) != 0)
  {
ch_log(channel, "Invalid function name: %s", func);
return;
*** ../vim-8.0.1646/src/testdir/test_terminal.vim   2018-03-25 
21:24:06.281680744 +0200
--- src/testdir/test_terminal.vim   2018-03-26 21:35:46.737323757 +0200
***
*** 1072,1095 
bwipe Xtextfile
  endfunc
  
! func TryThis(bufnum, arg)
let g:called_bufnum = a:bufnum
let g:called_arg = a:arg
  endfunc
  
! func Test_terminal_api_call()
!   if !CanRunVimInTerminal()
! return
!   endif
! 
" Use the title termcap entries to output the escape sequence.
call writefile([
\ 'set title',
\ 'exe "set t_ts=\]51; t_fs=\x07"',
!   \ 'let  = ''["call","TryThis",["hello",123]]''',
\ 'redraw',
\ "set t_ts=",
\ ], 'Xscript')
let buf = RunVimInTerminal('-S Xscript', {})
call WaitFor({-> exists('g:called_bufnum')})
call assert_equal(buf, g:called_bufnum)
--- 1072,1099 
bwipe Xtextfile
  endfunc
  
! func Tapi_TryThis(bufnum, arg)
let g:called_bufnum = a:bufnum
let g:called_arg = a:arg
  endfunc
  
! func WriteApiCall(funcname)
" Use the title termcap entries to output the escape sequence.
call writefile([
\ 'set title',
\ 'exe "set t_ts=\]51; t_fs=\x07"',
!   \ 'let  = ''["call","' . a:funcname . '",["hello",123]]''',
\ 'redraw',
\ "set t_ts=",
\ ], 'Xscript')
+ endfunc
+ 
+ func Test_terminal_api_call()
+   if 

Re: Vimgrep may add results to a wrong quickfix list

2018-03-26 Fir de Conversatie Bram Moolenaar

Yegappan wrote:

> When developing tests for autocmds changing the quickfix/location
> lists when vimgrep is running, I noticed that in some cases vimgrep
> may add results to a wrong quickfix list. The attached patch fixes
> this problem by using the quickfix list identifier and adds a test.

Thanks, I'll include it soon.

-- 
hundred-and-one symptoms of being an internet addict:
68. Your cat always puts viruses on your dogs homepage

 /// Bram Moolenaar -- b...@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

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.0.1646

2018-03-26 Fir de Conversatie Bram Moolenaar

Patch 8.0.1646
Problem:MS-Windows: executable contains unreferenced functions and data.
Solution:   Add /opt:ref to the compiler command. (Ken Takata)
Files:  src/Make_mvc.mak


*** ../vim-8.0.1645/src/Make_mvc.mak2018-03-14 21:38:57.908996048 +0100
--- src/Make_mvc.mak2018-03-26 20:41:04.985190708 +0200
***
*** 1158,1164 
  # CFLAGS with /Fo$(OUTDIR)/
  CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
  
! conflags = /nologo /subsystem:$(SUBSYSTEM)
  
  PATHDEF_SRC = $(OUTDIR)\pathdef.c
  
--- 1158,1166 
  # CFLAGS with /Fo$(OUTDIR)/
  CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
  
! # Add /opt:ref to remove unreferenced functions and data even when /DEBUG is
! # added.
! conflags = /nologo /subsystem:$(SUBSYSTEM) /opt:ref
  
  PATHDEF_SRC = $(OUTDIR)\pathdef.c
  
*** ../vim-8.0.1645/src/version.c   2018-03-25 21:24:06.285680721 +0200
--- src/version.c   2018-03-26 20:42:02.640857215 +0200
***
*** 768,769 
--- 768,771 
  {   /* Add new patch number below this line */
+ /**/
+ 1646,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
66. You create a homepage with the impression to cure the afflicted...but
your hidden agenda is to receive more e-mail.

 /// Bram Moolenaar -- b...@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

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [patch][win32] Use /opt:ref linker option to reduce the executable size

2018-03-26 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> This patch adds the /opt:ref linker option to Make_mvc.mak in order to reduce
> the size of the executable.  This option is enabled by default for release
> builds, however, we use the /DEBUG option even for the release builds, and
> this disables the /opt:ref option.  So we need to use this option explicitly.
> See: https://msdn.microsoft.com/en-us/library/bxwfs976.aspx
> 
> This reduces the size about 100KB on 32-bit HUGE version.

Thanks.  Looks like it's harmless.  I'll add a comment.

> P.S. MinGW also has a similar feature:
>   CFLAGS: -fdata-sections -ffunction-sections
>   LDFLAGS: -Wl,--gc-sections
> But I haven't tried this.

-- 
hundred-and-one symptoms of being an internet addict:
65. The last time you looked at the clock it was 11:30pm, and in what
seems like only a few seconds later, your sister runs past you to
catch her 7am school bus.

 /// Bram Moolenaar -- b...@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

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[patch][win32] Use /opt:ref linker option to reduce the executable size

2018-03-26 Fir de Conversatie Ken Takata
Hi,

This patch adds the /opt:ref linker option to Make_mvc.mak in order to reduce
the size of the executable.  This option is enabled by default for release
builds, however, we use the /DEBUG option even for the release builds, and
this disables the /opt:ref option.  So we need to use this option explicitly.
See: https://msdn.microsoft.com/en-us/library/bxwfs976.aspx

This reduces the size about 100KB on 32-bit HUGE version.

P.S. MinGW also has a similar feature:
  CFLAGS: -fdata-sections -ffunction-sections
  LDFLAGS: -Wl,--gc-sections
But I haven't tried this.

Regards,
Ken Takata

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  abac550bd9d58fcf1ad5fbb978ac57364339bf79

diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -1160,7 +1160,7 @@ LINK_PDB = /PDB:$(VIM).pdb -debug
 # CFLAGS with /Fo$(OUTDIR)/
 CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
 
-conflags = /nologo /subsystem:$(SUBSYSTEM)
+conflags = /nologo /subsystem:$(SUBSYSTEM) /opt:ref
 
 PATHDEF_SRC = $(OUTDIR)\pathdef.c
 


Re: Patch 8.0.1641

2018-03-26 Fir de Conversatie Elimar Riesebieter
* Elimar Riesebieter  [2018-03-25 19:43 +0200]:

> * Bram Moolenaar  [2018-03-25 18:58 +0200]:
> 
> > 
> > Elimar -
> > 
> > > test fails as follows:
> > > 
> > > * Bram Moolenaar  [2018-03-25 18:20 +0200]:
> > > 
> > > > 
> > > > Patch 8.0.1641
> > > > Problem:Job in terminal can't communicate with Vim.
> > > > Solution:   Add the terminal API.
> > > > Files:  src/terminal.c, src/buffer.c, src/testdir/test_terminal.vim,
> > > > src/testdir/screendump.vim, runtime/doc/terminal.txt
> > > Found errors in Test_terminal_api_call():
> > > Caught exception in Test_terminal_api_call(): WaitFor() timed out after 
> > > 1000 msec @ function RunTheTest[38]..Test_terminal_api_call[12]..WaitFor, 
> > > line 25
> > > Found errors in Test_terminal_api_drop_newwin():
> > > Caught exception in Test_terminal_api_drop_newwin(): WaitFor() timed out 
> > > after 1000 msec @ function 
> > > RunTheTest[38]..Test_terminal_api_drop_newwin[14]..WaitFor, line 25
> > > Found errors in Test_terminal_api_drop_oldwin():
> > > Caught exception in Test_terminal_api_drop_oldwin(): WaitFor() timed out 
> > > after 1000 msec @ 
> > > functionRunTheTest[38]..Test_terminal_api_drop_oldwin[18]..WaitFor, line 
> > > 25
> > 
> > Hmm, it works for me.  I wonder what causes the problem.

Has been gone with 8.0.1645.

Thanks
Elimar
-- 
  Experience is something you don't get until
  just after you need it!

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.