Re: partial arguments is broken

2016-03-15 Fir de Conversatie mattn
Sorry, still bad. I'll look into 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.


Re: Patch 7.4.1353

2016-03-15 Fir de Conversatie Ken Takata
Hi,

2016/3/16 Wed 3:16:20 UTC+9 Marslo Jiao wrote:
> On Tuesday, 15 March 2016 10:49:07 UTC-7, Ken Takata  wrote:
> > Hi,
> > 
> > 2016/3/16 Wed 2:35:06 UTC+9 Marslo Jiao wrote:
> > > On Thursday, 18 February 2016 13:58:47 UTC-8, Bram Moolenaar  wrote:
> > > > Patch 7.4.1353
> > > > Problem:Test_connect_waittime is skipped for MS-Windows.
> > > > Solution:   Add the test back, it works now.
> > > > Files:  src/testdir/test_channel.vim
> > > > 
> > > > 
> > > > *** ../vim-7.4.1352/src/testdir/test_channel.vim2016-02-18 
> > > > 22:23:21.173660406 +0100
> > > > --- src/testdir/test_channel.vim2016-02-18 22:55:42.037193693 
> > > > +0100
> > > > ***
> > > > *** 268,277 
> > > >   
> > > >   " Test that trying to connect to a non-existing port fails quickly.
> > > >   func Test_connect_waittime()
> > > > -   if !has('unix')
> > > > - " TODO: Make this work again for MS-Windows.
> > > > - return
> > > > -   endif
> > > > call ch_log('Test_connect_waittime()')
> > > > let start = reltime()
> > > > let handle = ch_open('localhost:9876', s:chopt)
> > > > --- 268,273 
> > > > *** ../vim-7.4.1352/src/version.c   2016-02-18 22:25:37.468230944 
> > > > +0100
> > > > --- src/version.c   2016-02-18 22:57:51.127835583 +0100
> > > > ***
> > > > *** 749,750 
> > > > --- 749,752 
> > > >   {   /* Add new patch number below this line */
> > > > + /**/
> > > > + 1353,
> > > >   /**/
> > > > 
> > > > -- 
> > > > FATHER: One day, lad, all this will be yours ...
> > > > PRINCE: What - the curtains?
> > > >  "Monty Python and the Holy Grail" PYTHON (MONTY) 
> > > > PICTURES LTD
> > > > 
> > > >  /// 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
> > > > ///
> > > 
> > > Since 7.4.1306, vim.exe and gvim.exe cannot be built. Do you know why? 
> > > and is this my environment error?
> > > 
> > > --
> > > Here is my build command:
> > >   > make -B -f Make_cyg.mak 
> > > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes 
> > > MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
> > >   > make -B -f Make_cyg.mak 
> > > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes 
> > > MBYTE=yes CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
> > > 
> > > ---
> > > And this is the error log:
> > > >>> for vim.exe: obji386/os_win32.o:os_win32.c:(.text+0x64df): undefined 
> > > >>> reference to `AttachConsole'
> > > collect2: error: ld returned 1 exit status
> > > Make_cyg_ming.mak:806: recipe for target 'vim.exe' failed
> > > make: *** [vim.exe] Error 1
> > > 
> > > >>> for gvim.exe: 
> > > channel.c: In function ‘channel_open’:
> > > channel.c:426:39: error: ‘EINPROGRESS’ undeclared (first use in this 
> > > function)
> > > channel.c:426:39: note: each undeclared identifier is reported only once 
> > > for each function it appears in
> > > Make_cyg_ming.mak:890: recipe for target 'gobji386/channel.o' failed
> > > make: *** [gobji386/channel.o] Error 1
> > 
> > Does the error still occur after 7.4.1354?
> > Some errors with old MinGW should have been fixed with 7.4.1354.
> > Or I suggest you to use MinGW-w64. (Cygwin also has MinGW-w64 packages.)
> > 
> > Regards,
> > Ken Takata
> 
> Okay.. I didn't find mingw-w64 in my cygwin setup.exe. I suppose it because 
> of my cygwin is for 64bit (setup-x86_64.exe)?

You may find mingw64-i686-gcc-g++ (for 32-bit target) or mingw64-x86_64-gcc-g++
(for 64-bit target).

You need to set CROSS_COMPILE and ARCH variables properly when you use 
MinGW-w64.
Please see the lines 40-47 in src/Make_cyg.mak for detail.

E.g. (64-bit target):
  make -f Make_cyg.mak CROSS_COMPILE=x86_64-w64-mingw32- ARCH=x86-64 ...


BTW, I have built both 7.4.1354 and 7.4.1579 successfully with MinGW 4.7.3
(the mingw-gcc-g++ package in Cygwin) with minimal setting:

  make -f Make_cyg.mak

Something might be wrong in your environment or setting...


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 

partial arguments is broken

2016-03-15 Fir de Conversatie mattn
Hi.


let Cb = function('MyFunc', ["foo", "bar"])
call assert_equal("foo/bar/xxx", Cb("xxx"))


This works fine. But "call" doesn't work.


:call Cb("xxx")
test_partial.vim  19,14
Error detected while processing function Test_partial_args:
line2:
E119: Not enough arguments for function: MyFunc


And I noticed below doesn't work too.


let dict = {"tr": function('tr', ['hello', 'h', 'H'])}
call assert_equal("Hello", dict.tr())


Below is a patch. Please take a look.

mattn

https://gist.github.com/mattn/fa3b387ddcb5cb5522d4

-- 
-- 
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: [vim] Add "Don't give the file editing message" flag in shortmess option. (#686)

2016-03-15 Fir de Conversatie h_east
Hi Bram.

2016-3-16(Wed) 0:54:25 UTC+9 Bram:
> Hirohito Higashi wrote:
> 
> 
> 
> > 
> 
> > src/buffer.c
> 
> > @@ -139,14 +139,20 @@ open_buffer(
> 
> >   #endif
> 
> >  )
> 
> >   {
> 
> >  +int old_msg_silent = msg_silent;
> 
> >  +
> 
> >   #ifdef FEAT_NETBEANS_INTG
> 
> > int oldFire = netbeansFireChanges;
> 
> >   
> 
> > netbeansFireChanges = 0;
> 
> >   #endif
> 
> >  +if (shortmess(SHM_FILEINFO))
> 
> >  +msg_silent = 1;
> 
> > retval = readfile(curbuf->b_ffname, curbuf->b_fname,
> 
> >   (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap,
> 
> >   flags | READ_NEW);
> 
> >  +if (shortmess(SHM_FILEINFO))
> 
> >  +msg_silent = old_msg_silent;
> 
> >   #ifdef FEAT_NETBEANS_INTG
> 
> > netbeansFireChanges = oldFire;
> 
> >   #endif
> 
> > 
> 
> > 
> 
> > Once because the `shortmess(SHM_FILEINFO)` of the results are likely to 
> > change in autocmd in the readfile(), It should set to the variable.
> 
> > 
> 
> > 
> 
> > int has_shm_fileinfo = shortmess(SHM_FILEINFO);
> 
> > 
> 
> > if (has_shm_fileinfo)
> 
> > msg_silent = 1;
> 
> > retval = readfile(...);
> 
> > if (has_shm_fileinfo)
> 
> > msg_silent = old_msg_silent;
> 
> 
> 
> I had solved that by restoring old_msg_silent always.  I don't think
> 
> msg_silent should change in readfile().

Yes. Your fix was solved problem.
Thanks.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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: [vim] gtk3vim: shortened output of external programs and very slow rendering of the output (#681)

2016-03-15 Fir de Conversatie Kazunobu Kuriyama
(I presume you're namsh.)

I made sure that, for both gtk2vim and gtk3vim,  the numbers of calls of
the function are the same, which implies we can safely assume that the
function is not a bottleneck.  A useful info.

Thank you!
Kazunobu

2016-03-16 8:51 GMT+09:00 goweol :

> Hello,
>
> Here is a full profile.
>
> Thanks,
>
> anal-gtk2.txt.gz
> 
> anal-gtk3.txt.gz
> 
>
> —
> You are receiving this because you commented.
> Reply to this email directly or view it on GitHub
> 
>
> --
> --
> 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.
>

-- 
-- 
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 7.4.1579

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1579 (after 7.4.1578)
Problem:Missing changes in channel.c
Solution:   Include the changes.
Files:  src/channel.c


*** ../vim-7.4.1578/src/channel.c   2016-03-14 23:22:31.219768924 +0100
--- src/channel.c   2016-03-15 21:43:05.083902085 +0100
***
*** 1285,1303 
, 2, argv, 0L, 0L, , TRUE, partial, NULL);
  clear_tv();
  
! /* If an echo command was used the cursor needs to be put back where
!  * it belongs. If highlighting was changed a redraw is needed. */
! update_screen(0);
! setcursor();
! cursor_on();
! out_flush();
! #ifdef FEAT_GUI
! if (gui.in_use)
! {
!   gui_update_cursor(TRUE, FALSE);
!   gui_mch_flush();
! }
! #endif
  }
  
  /*
--- 1285,1291 
, 2, argv, 0L, 0L, , TRUE, partial, NULL);
  clear_tv();
  
! redraw_after_callback();
  }
  
  /*
***
*** 3024,3051 
  return channel->ch_part[part].ch_timeout;
  }
  
- /*
-  * Get a callback from "arg".  It can be a Funcref or a function name.
-  * When "arg" is zero return an empty string.
-  * Return NULL for an invalid argument.
-  */
- static char_u *
- get_callback(typval_T *arg, partial_T **pp)
- {
- if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL)
- {
-   *pp = arg->vval.v_partial;
-   return (*pp)->pt_name;
- }
- *pp = NULL;
- if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING)
-   return arg->vval.v_string;
- if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
-   return (char_u *)"";
- EMSG(_("E921: Invalid callback argument"));
- return NULL;
- }
- 
  static int
  handle_mode(typval_T *item, jobopt_T *opt, ch_mode_T *modep, int jo)
  {
--- 3012,3017 
*** ../vim-7.4.1578/src/version.c   2016-03-15 23:10:26.412712095 +0100
--- src/version.c   2016-03-15 23:18:22.447688326 +0100
***
*** 750,751 
--- 750,753 
  {   /* Add new patch number below this line */
+ /**/
+ 1579,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
53. To find out what time it is, you send yourself an e-mail and check the
"Date:" field.

 /// 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 7.4.1578

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1578
Problem:There is no way to invoke a function later or periodically.
Solution:   Add timer support.
Files:  src/eval.c, src/ex_cmds2.c, src/screen.c, src/ex_docmd.c,
src/feature.h, src/gui.c, src/proto/eval.pro,
src/proto/ex_cmds2.pro, src/proto/screen.pro, src/structs.h,
src/version.c, src/testdir/test_alot.vim,
src/testdir/test_timers.vim, runtime/doc/eval.txt


*** ../vim-7.4.1577/src/eval.c  2016-03-15 19:33:30.057375668 +0100
--- src/eval.c  2016-03-15 22:25:38.837062813 +0100
***
*** 794,799 
--- 794,803 
  static void f_tan(typval_T *argvars, typval_T *rettv);
  static void f_tanh(typval_T *argvars, typval_T *rettv);
  #endif
+ #ifdef FEAT_TIMERS
+ static void f_timer_start(typval_T *argvars, typval_T *rettv);
+ static void f_timer_stop(typval_T *argvars, typval_T *rettv);
+ #endif
  static void f_tolower(typval_T *argvars, typval_T *rettv);
  static void f_toupper(typval_T *argvars, typval_T *rettv);
  static void f_tr(typval_T *argvars, typval_T *rettv);
***
*** 8404,8409 
--- 8408,8417 
  #endif
  {"tempname",  0, 0, f_tempname},
  {"test",  1, 1, f_test},
+ #ifdef FEAT_TIMERS
+ {"timer_start",   2, 3, f_timer_start},
+ {"timer_stop",1, 1, f_timer_stop},
+ #endif
  {"tolower",   1, 1, f_tolower},
  {"toupper",   1, 1, f_toupper},
  {"tr",3, 3, f_tr},
***
*** 13648,13653 
--- 13656,13664 
  #ifdef HAVE_TGETENT
"tgetent",
  #endif
+ #ifdef FEAT_TIMERS
+   "timers",
+ #endif
  #ifdef FEAT_TITLE
"title",
  #endif
***
*** 20077,20082 
--- 20088,20169 
  }
  #endif
  
+ #if defined(FEAT_JOB_CHANNEL) || defined(FEAT_TIMERS) || defined(PROTO)
+ /*
+  * Get a callback from "arg".  It can be a Funcref or a function name.
+  * When "arg" is zero return an empty string.
+  * Return NULL for an invalid argument.
+  */
+ char_u *
+ get_callback(typval_T *arg, partial_T **pp)
+ {
+ if (arg->v_type == VAR_PARTIAL && arg->vval.v_partial != NULL)
+ {
+   *pp = arg->vval.v_partial;
+   return (*pp)->pt_name;
+ }
+ *pp = NULL;
+ if (arg->v_type == VAR_FUNC || arg->v_type == VAR_STRING)
+   return arg->vval.v_string;
+ if (arg->v_type == VAR_NUMBER && arg->vval.v_number == 0)
+   return (char_u *)"";
+ EMSG(_("E921: Invalid callback argument"));
+ return NULL;
+ }
+ #endif
+ 
+ #ifdef FEAT_TIMERS
+ /*
+  * "timer_start(time, callback [, options])" function
+  */
+ static void
+ f_timer_start(typval_T *argvars, typval_T *rettv)
+ {
+ longmsec = get_tv_number([0]);
+ timer_T *timer;
+ int   repeat = 0;
+ char_u  *callback;
+ dict_T  *dict;
+ 
+ if (argvars[2].v_type != VAR_UNKNOWN)
+ {
+   if (argvars[2].v_type != VAR_DICT
+  || (dict = argvars[2].vval.v_dict) == NULL)
+   {
+   EMSG2(_(e_invarg2), get_tv_string([2]));
+   return;
+   }
+   if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
+   repeat = get_dict_number(dict, (char_u *)"repeat");
+ }
+ 
+ timer = create_timer(msec, repeat);
+ callback = get_callback([1], >tr_partial);
+ if (callback == NULL)
+ {
+   stop_timer(timer);
+   rettv->vval.v_number = -1;
+ }
+ else
+ {
+   timer->tr_callback = vim_strsave(callback);
+   rettv->vval.v_number = timer->tr_id;
+ }
+ }
+ 
+ /*
+  * "timer_stop(timer)" function
+  */
+ static void
+ f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED)
+ {
+ timer_T *timer = find_timer(get_tv_number([0]));
+ 
+ if (timer != NULL)
+   stop_timer(timer);
+ }
+ #endif
+ 
  /*
   * "tolower(string)" function
   */
*** ../vim-7.4.1577/src/ex_cmds2.c  2016-03-12 22:47:10.548935254 +0100
--- src/ex_cmds2.c  2016-03-15 22:26:48.716325705 +0100
***
*** 1088,1093 
--- 1088,1261 
  
  # endif  /* FEAT_PROFILE || FEAT_RELTIME */
  
+ # if defined(FEAT_TIMERS) || defined(PROTO)
+ static timer_T*first_timer = NULL;
+ static intlast_timer_id = 0;
+ 
+ /*
+  * Insert a timer in the list of timers.
+  */
+ static void
+ insert_timer(timer_T *timer)
+ {
+ timer->tr_next = first_timer;
+ timer->tr_prev = NULL;
+ if (first_timer != NULL)
+   first_timer->tr_prev = timer;
+ first_timer = timer;
+ }
+ 
+ /*
+  * Take a timer out of the list of timers.
+  */
+ static void
+ remove_timer(timer_T *timer)
+ {
+ if (timer->tr_prev == NULL)
+   first_timer = timer->tr_next;
+ else
+   timer->tr_prev->tr_next = timer->tr_next;
+ if (timer->tr_next != NULL)
+   timer->tr_next->tr_prev = timer->tr_prev;
+ }
+ 
+ static void
+ free_timer(timer_T *timer)
+ {
+ vim_free(timer->tr_callback);
+ partial_unref(timer->tr_partial);
+ vim_free(timer);
+ }
+ 
+ /*
+  * Create a timer 

Re: Patch 7.4.1577

2016-03-15 Fir de Conversatie Kent Sibilev
On Tuesday, March 15, 2016 at 2:33:55 PM UTC-4, Bram Moolenaar wrote:
> Patch 7.4.1577
> Problem:Cannot pass "dict.Myfunc" around as a partial.
> Solution:   Create a partial when expected.
> Files:  src/eval.c, src/testdir/test_partial.vim
> 

This change doesn't allow functions like this:

function! s:cache_clear(...) dict

function! rails#cache_clear(...)

to be defined at the same time. Any particular reason for this, cause this 
change breaks vim-rails plugin.

Thanks,
Kent Sibilev

-- 
-- 
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 7.4.1577

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1577
Problem:Cannot pass "dict.Myfunc" around as a partial.
Solution:   Create a partial when expected.
Files:  src/eval.c, src/testdir/test_partial.vim


*** ../vim-7.4.1576/src/eval.c  2016-03-15 13:33:50.709244886 +0100
--- src/eval.c  2016-03-15 19:19:48.733981126 +0100
***
*** 110,115 
--- 110,116 
  #ifdef FEAT_FLOAT
  static char *e_float_as_string = N_("E806: using Float as a String");
  #endif
+ static char *e_dict_both = N_("E924: can't have both a \"self\" dict and a 
partial: %s");
  
  #define NAMESPACE_CHAR(char_u *)"abglstvw"
  
***
*** 8912,8919 
name);
break;
case ERROR_BOTH:
!   emsg_funcname(N_("E924: can't have both a \"self\" dict and 
a partial: %s"),
!   name);
break;
}
  }
--- 8913,8919 
name);
break;
case ERROR_BOTH:
!   emsg_funcname(e_dict_both, name);
break;
}
  }
***
*** 11782,11793 
  {
  char_u*s;
  char_u*name;
  
! s = get_tv_string([0]);
! if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
EMSG2(_(e_invarg2), s);
  /* Don't check an autoload name for existence here. */
! else if (vim_strchr(s, AUTOLOAD_CHAR) == NULL && !function_exists(s))
EMSG2(_("E700: Unknown function: %s"), s);
  else
  {
--- 11782,11810 
  {
  char_u*s;
  char_u*name;
+ int   use_string = FALSE;
  
! if (argvars[0].v_type == VAR_FUNC)
! {
!   /* function(MyFunc, [arg], dict) */
!   s = argvars[0].vval.v_string;
! }
! else if (argvars[0].v_type == VAR_PARTIAL
!&& argvars[0].vval.v_partial != NULL)
!   /* function(dict.MyFunc, [arg]) */
!   s = argvars[0].vval.v_partial->pt_name;
! else
! {
!   /* function('MyFunc', [arg], dict) */
!   s = get_tv_string([0]);
!   use_string = TRUE;
! }
! 
! if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s)))
EMSG2(_(e_invarg2), s);
  /* Don't check an autoload name for existence here. */
! else if (use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL
!  && !function_exists(s))
EMSG2(_("E700: Unknown function: %s"), s);
  else
  {
***
*** 11837,11842 
--- 11854,11865 
vim_free(name);
return;
}
+   if (argvars[0].v_type == VAR_PARTIAL)
+   {
+   EMSG2(_(e_dict_both), name);
+   vim_free(name);
+   return;
+   }
if (argvars[dict_idx].vval.v_dict == NULL)
dict_idx = 0;
}
***
*** 11880,11886 
}
}
  
!   if (dict_idx > 0)
{
pt->pt_dict = argvars[dict_idx].vval.v_dict;
++pt->pt_dict->dv_refcount;
--- 11903,11914 
}
}
  
!   if (argvars[0].v_type == VAR_PARTIAL)
!   {
!   pt->pt_dict = argvars[0].vval.v_partial->pt_dict;
!   ++pt->pt_dict->dv_refcount;
!   }
!   else if (dict_idx > 0)
{
pt->pt_dict = argvars[dict_idx].vval.v_dict;
++pt->pt_dict->dv_refcount;
***
*** 21533,21539 
rettv->v_type = VAR_UNKNOWN;
  
/* Invoke the function.  Recursive! */
!   if (rettv->v_type == VAR_PARTIAL)
{
pt = functv.vval.v_partial;
s = pt->pt_name;
--- 21561,21567 
rettv->v_type = VAR_UNKNOWN;
  
/* Invoke the function.  Recursive! */
!   if (functv.v_type == VAR_PARTIAL)
{
pt = functv.vval.v_partial;
s = pt->pt_name;
***
*** 21582,21587 
--- 21610,21632 
}
}
  }
+ 
+ if (rettv->v_type == VAR_FUNC && selfdict != NULL)
+ {
+   partial_T   *pt = (partial_T *)alloc_clear(sizeof(partial_T));
+ 
+   /* Turn "dict.Func" into a partial for "Func" with "dict". */
+   if (pt != NULL)
+   {
+   pt->pt_dict = selfdict;
+   selfdict = NULL;
+   pt->pt_name = rettv->vval.v_string;
+   func_ref(pt->pt_name);
+   rettv->v_type = VAR_PARTIAL;
+   rettv->vval.v_partial = pt;
+   }
+ }
+ 
  dict_unref(selfdict);
  return ret;
  }
*** 

Re: Patch 7.4.1353

2016-03-15 Fir de Conversatie Marslo Jiao
On Tuesday, 15 March 2016 10:49:07 UTC-7, Ken Takata  wrote:
> Hi,
> 
> 2016/3/16 Wed 2:35:06 UTC+9 Marslo Jiao wrote:
> > On Thursday, 18 February 2016 13:58:47 UTC-8, Bram Moolenaar  wrote:
> > > Patch 7.4.1353
> > > Problem:Test_connect_waittime is skipped for MS-Windows.
> > > Solution:   Add the test back, it works now.
> > > Files:  src/testdir/test_channel.vim
> > > 
> > > 
> > > *** ../vim-7.4.1352/src/testdir/test_channel.vim  2016-02-18 
> > > 22:23:21.173660406 +0100
> > > --- src/testdir/test_channel.vim  2016-02-18 22:55:42.037193693 +0100
> > > ***
> > > *** 268,277 
> > >   
> > >   " Test that trying to connect to a non-existing port fails quickly.
> > >   func Test_connect_waittime()
> > > -   if !has('unix')
> > > - " TODO: Make this work again for MS-Windows.
> > > - return
> > > -   endif
> > > call ch_log('Test_connect_waittime()')
> > > let start = reltime()
> > > let handle = ch_open('localhost:9876', s:chopt)
> > > --- 268,273 
> > > *** ../vim-7.4.1352/src/version.c 2016-02-18 22:25:37.468230944 +0100
> > > --- src/version.c 2016-02-18 22:57:51.127835583 +0100
> > > ***
> > > *** 749,750 
> > > --- 749,752 
> > >   {   /* Add new patch number below this line */
> > > + /**/
> > > + 1353,
> > >   /**/
> > > 
> > > -- 
> > > FATHER: One day, lad, all this will be yours ...
> > > PRINCE: What - the curtains?
> > >  "Monty Python and the Holy Grail" PYTHON (MONTY) 
> > > PICTURES LTD
> > > 
> > >  /// 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
> > > ///
> > 
> > Since 7.4.1306, vim.exe and gvim.exe cannot be built. Do you know why? and 
> > is this my environment error?
> > 
> > --
> > Here is my build command:
> >   > make -B -f Make_cyg.mak 
> > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
> > CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
> >   > make -B -f Make_cyg.mak 
> > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
> > CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
> > 
> > ---
> > And this is the error log:
> > >>> for vim.exe: obji386/os_win32.o:os_win32.c:(.text+0x64df): undefined 
> > >>> reference to `AttachConsole'
> > collect2: error: ld returned 1 exit status
> > Make_cyg_ming.mak:806: recipe for target 'vim.exe' failed
> > make: *** [vim.exe] Error 1
> > 
> > >>> for gvim.exe: 
> > channel.c: In function ‘channel_open’:
> > channel.c:426:39: error: ‘EINPROGRESS’ undeclared (first use in this 
> > function)
> > channel.c:426:39: note: each undeclared identifier is reported only once 
> > for each function it appears in
> > Make_cyg_ming.mak:890: recipe for target 'gobji386/channel.o' failed
> > make: *** [gobji386/channel.o] Error 1
> 
> Does the error still occur after 7.4.1354?
> Some errors with old MinGW should have been fixed with 7.4.1354.
> Or I suggest you to use MinGW-w64. (Cygwin also has MinGW-w64 packages.)
> 
> Regards,
> Ken Takata

Okay.. I didn't find mingw-w64 in my cygwin setup.exe. I suppose it because of 
my cygwin is for 64bit (setup-x86_64.exe)?

-- 
-- 
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 7.4.1353

2016-03-15 Fir de Conversatie Marslo Jiao
On Tuesday, 15 March 2016 10:49:07 UTC-7, Ken Takata  wrote:
> Hi,
> 
> 2016/3/16 Wed 2:35:06 UTC+9 Marslo Jiao wrote:
> > On Thursday, 18 February 2016 13:58:47 UTC-8, Bram Moolenaar  wrote:
> > > Patch 7.4.1353
> > > Problem:Test_connect_waittime is skipped for MS-Windows.
> > > Solution:   Add the test back, it works now.
> > > Files:  src/testdir/test_channel.vim
> > > 
> > > 
> > > *** ../vim-7.4.1352/src/testdir/test_channel.vim  2016-02-18 
> > > 22:23:21.173660406 +0100
> > > --- src/testdir/test_channel.vim  2016-02-18 22:55:42.037193693 +0100
> > > ***
> > > *** 268,277 
> > >   
> > >   " Test that trying to connect to a non-existing port fails quickly.
> > >   func Test_connect_waittime()
> > > -   if !has('unix')
> > > - " TODO: Make this work again for MS-Windows.
> > > - return
> > > -   endif
> > > call ch_log('Test_connect_waittime()')
> > > let start = reltime()
> > > let handle = ch_open('localhost:9876', s:chopt)
> > > --- 268,273 
> > > *** ../vim-7.4.1352/src/version.c 2016-02-18 22:25:37.468230944 +0100
> > > --- src/version.c 2016-02-18 22:57:51.127835583 +0100
> > > ***
> > > *** 749,750 
> > > --- 749,752 
> > >   {   /* Add new patch number below this line */
> > > + /**/
> > > + 1353,
> > >   /**/
> > > 
> > > -- 
> > > FATHER: One day, lad, all this will be yours ...
> > > PRINCE: What - the curtains?
> > >  "Monty Python and the Holy Grail" PYTHON (MONTY) 
> > > PICTURES LTD
> > > 
> > >  /// 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
> > > ///
> > 
> > Since 7.4.1306, vim.exe and gvim.exe cannot be built. Do you know why? and 
> > is this my environment error?
> > 
> > --
> > Here is my build command:
> >   > make -B -f Make_cyg.mak 
> > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
> > CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
> >   > make -B -f Make_cyg.mak 
> > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
> > CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
> > 
> > ---
> > And this is the error log:
> > >>> for vim.exe: obji386/os_win32.o:os_win32.c:(.text+0x64df): undefined 
> > >>> reference to `AttachConsole'
> > collect2: error: ld returned 1 exit status
> > Make_cyg_ming.mak:806: recipe for target 'vim.exe' failed
> > make: *** [vim.exe] Error 1
> > 
> > >>> for gvim.exe: 
> > channel.c: In function ‘channel_open’:
> > channel.c:426:39: error: ‘EINPROGRESS’ undeclared (first use in this 
> > function)
> > channel.c:426:39: note: each undeclared identifier is reported only once 
> > for each function it appears in
> > Make_cyg_ming.mak:890: recipe for target 'gobji386/channel.o' failed
> > make: *** [gobji386/channel.o] Error 1
> 
> Does the error still occur after 7.4.1354?
> Some errors with old MinGW should have been fixed with 7.4.1354.
> Or I suggest you to use MinGW-w64. (Cygwin also has MinGW-w64 packages.)
> 
> Regards,
> Ken Takata

By the way, I want to know, after I upgrade the MinGW-w64, should I update my 
built command?
The command is: make -B -f Make_cyg.mak 
PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no

-- 
-- 
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 7.4.1353

2016-03-15 Fir de Conversatie Marslo Jiao
On Tuesday, 15 March 2016 10:49:07 UTC-7, Ken Takata  wrote:
> Hi,
> 
> 2016/3/16 Wed 2:35:06 UTC+9 Marslo Jiao wrote:
> > On Thursday, 18 February 2016 13:58:47 UTC-8, Bram Moolenaar  wrote:
> > > Patch 7.4.1353
> > > Problem:Test_connect_waittime is skipped for MS-Windows.
> > > Solution:   Add the test back, it works now.
> > > Files:  src/testdir/test_channel.vim
> > > 
> > > 
> > > *** ../vim-7.4.1352/src/testdir/test_channel.vim  2016-02-18 
> > > 22:23:21.173660406 +0100
> > > --- src/testdir/test_channel.vim  2016-02-18 22:55:42.037193693 +0100
> > > ***
> > > *** 268,277 
> > >   
> > >   " Test that trying to connect to a non-existing port fails quickly.
> > >   func Test_connect_waittime()
> > > -   if !has('unix')
> > > - " TODO: Make this work again for MS-Windows.
> > > - return
> > > -   endif
> > > call ch_log('Test_connect_waittime()')
> > > let start = reltime()
> > > let handle = ch_open('localhost:9876', s:chopt)
> > > --- 268,273 
> > > *** ../vim-7.4.1352/src/version.c 2016-02-18 22:25:37.468230944 +0100
> > > --- src/version.c 2016-02-18 22:57:51.127835583 +0100
> > > ***
> > > *** 749,750 
> > > --- 749,752 
> > >   {   /* Add new patch number below this line */
> > > + /**/
> > > + 1353,
> > >   /**/
> > > 
> > > -- 
> > > FATHER: One day, lad, all this will be yours ...
> > > PRINCE: What - the curtains?
> > >  "Monty Python and the Holy Grail" PYTHON (MONTY) 
> > > PICTURES LTD
> > > 
> > >  /// 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
> > > ///
> > 
> > Since 7.4.1306, vim.exe and gvim.exe cannot be built. Do you know why? and 
> > is this my environment error?
> > 
> > --
> > Here is my build command:
> >   > make -B -f Make_cyg.mak 
> > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
> > CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
> >   > make -B -f Make_cyg.mak 
> > PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 DYNAMIC_PYTHON=yes 
> > PYTHON_VER=27 PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 
> > DYNAMIC_PYTHON3=yes PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes 
> > CSCOPE=yes USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
> > 
> > ---
> > And this is the error log:
> > >>> for vim.exe: obji386/os_win32.o:os_win32.c:(.text+0x64df): undefined 
> > >>> reference to `AttachConsole'
> > collect2: error: ld returned 1 exit status
> > Make_cyg_ming.mak:806: recipe for target 'vim.exe' failed
> > make: *** [vim.exe] Error 1
> > 
> > >>> for gvim.exe: 
> > channel.c: In function ‘channel_open’:
> > channel.c:426:39: error: ‘EINPROGRESS’ undeclared (first use in this 
> > function)
> > channel.c:426:39: note: each undeclared identifier is reported only once 
> > for each function it appears in
> > Make_cyg_ming.mak:890: recipe for target 'gobji386/channel.o' failed
> > make: *** [gobji386/channel.o] Error 1
> 
> Does the error still occur after 7.4.1354?
> Some errors with old MinGW should have been fixed with 7.4.1354.
> Or I suggest you to use MinGW-w64. (Cygwin also has MinGW-w64 packages.)
> 
> Regards,
> Ken Takata

No. After 7.4.1354, vim.exe and gvim.exe can be built successfully.
Okay. I will have try to suing MinGW-w64.
Thanks.

My situation is:
- From 7.4.1263 to 7.4.1305: only vim.exe. gvim.exe CANNOT be built.
- From 7.4.1305 to 7.4.1354: both vim.exe and gvim.exe CANNOT be built.

-- 
-- 
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 7.4.1353

2016-03-15 Fir de Conversatie Ken Takata
Hi,

2016/3/16 Wed 2:35:06 UTC+9 Marslo Jiao wrote:
> On Thursday, 18 February 2016 13:58:47 UTC-8, Bram Moolenaar  wrote:
> > Patch 7.4.1353
> > Problem:Test_connect_waittime is skipped for MS-Windows.
> > Solution:   Add the test back, it works now.
> > Files:  src/testdir/test_channel.vim
> > 
> > 
> > *** ../vim-7.4.1352/src/testdir/test_channel.vim2016-02-18 
> > 22:23:21.173660406 +0100
> > --- src/testdir/test_channel.vim2016-02-18 22:55:42.037193693 +0100
> > ***
> > *** 268,277 
> >   
> >   " Test that trying to connect to a non-existing port fails quickly.
> >   func Test_connect_waittime()
> > -   if !has('unix')
> > - " TODO: Make this work again for MS-Windows.
> > - return
> > -   endif
> > call ch_log('Test_connect_waittime()')
> > let start = reltime()
> > let handle = ch_open('localhost:9876', s:chopt)
> > --- 268,273 
> > *** ../vim-7.4.1352/src/version.c   2016-02-18 22:25:37.468230944 +0100
> > --- src/version.c   2016-02-18 22:57:51.127835583 +0100
> > ***
> > *** 749,750 
> > --- 749,752 
> >   {   /* Add new patch number below this line */
> > + /**/
> > + 1353,
> >   /**/
> > 
> > -- 
> > FATHER: One day, lad, all this will be yours ...
> > PRINCE: What - the curtains?
> >  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES 
> > LTD
> > 
> >  /// 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///
> 
> Since 7.4.1306, vim.exe and gvim.exe cannot be built. Do you know why? and is 
> this my environment error?
> 
> --
> Here is my build command:
>   > make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 
> DYNAMIC_PYTHON=yes PYTHON_VER=27 
> PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 DYNAMIC_PYTHON3=yes 
> PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes 
> USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
>   > make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 
> DYNAMIC_PYTHON=yes PYTHON_VER=27 
> PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 DYNAMIC_PYTHON3=yes 
> PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes 
> USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no
> 
> ---
> And this is the error log:
> >>> for vim.exe: obji386/os_win32.o:os_win32.c:(.text+0x64df): undefined 
> >>> reference to `AttachConsole'
> collect2: error: ld returned 1 exit status
> Make_cyg_ming.mak:806: recipe for target 'vim.exe' failed
> make: *** [vim.exe] Error 1
> 
> >>> for gvim.exe: 
> channel.c: In function ‘channel_open’:
> channel.c:426:39: error: ‘EINPROGRESS’ undeclared (first use in this function)
> channel.c:426:39: note: each undeclared identifier is reported only once for 
> each function it appears in
> Make_cyg_ming.mak:890: recipe for target 'gobji386/channel.o' failed
> make: *** [gobji386/channel.o] Error 1

Does the error still occur after 7.4.1354?
Some errors with old MinGW should have been fixed with 7.4.1354.
Or I suggest you to use MinGW-w64. (Cygwin also has MinGW-w64 packages.)

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.


Re: Patch 7.4.1263

2016-03-15 Fir de Conversatie Marslo Jiao
On Friday, 5 February 2016 13:37:07 UTC-8, Bram Moolenaar  wrote:
> Patch 7.4.1263
> Problem:ch_open() hangs when the server isn't running.
> Solution:   Add a timeout. Use a dict to pass arguments. (Yasuhiro Matsumoto)
> Files:  runtime/doc/eval.txt, runtime/doc/channel.txt, src/channel.c,
> src/eval.c, src/netbeans.c, src/os_win32.c, src/proto/channel.pro,
> src/testdir/test_channel.vim
> 
> 
> *** ../vim-7.4.1262/runtime/doc/eval.txt  2016-02-02 20:46:29.715412004 
> +0100
> --- runtime/doc/eval.txt  2016-02-05 21:53:15.728780022 +0100
> ***
> *** 1786,1793 
>   any call {func} with arguments {arglist}
>   ceil( {expr})   Float   round {expr} up
>   ch_close( {handle}) noneclose a channel
> ! ch_open( {address}, {mode} [, {callback}])
> ! Number  open a channel
>   ch_sendexpr( {handle}, {expr} [, {callback}])
>   any send {expr} over JSON channel {handle}
>   ch_sendraw( {handle}, {string} [, {callback}])
> --- 1811,1817 
>   any call {func} with arguments {arglist}
>   ceil( {expr})   Float   round {expr} up
>   ch_close( {handle}) noneclose a channel
> ! ch_open( {address} [, {argdict})] Number open a channel to {address}
>   ch_sendexpr( {handle}, {expr} [, {callback}])
>   any send {expr} over JSON channel {handle}
>   ch_sendraw( {handle}, {string} [, {callback}])
> ***
> *** 2641,2647 
>   ch_close({handle})  *ch_close()*
>   Close channel {handle}.  See |channel|.
>   
> ! ch_open({address}, {mode} [, {callback}])   *ch_open()*
>   Open a channel to {address}.  See |channel|.
>   Returns the channel handle on success.  Returns a negative
>   number for failure.
> --- 2669,2675 
>   ch_close({handle})  *ch_close()*
>   Close channel {handle}.  See |channel|.
>   
> ! ch_open({address} [, {argdict}])*ch_open()*
>   Open a channel to {address}.  See |channel|.
>   Returns the channel handle on success.  Returns a negative
>   number for failure.
> ***
> *** 2649,2661 
>   {address} has the form "hostname:port", e.g.,
>   "localhost:8765".
>   
> ! {mode} is either "json" or "raw".  See |channel-mode| for the
> ! meaning.
> ! 
> ! {callback} is a function that handles received messages on the
> ! channel.  See |channel-callback|.
>   
> ! ch_sendexpr({handle}, {expr} [, {callback}])ch_*sendexpr()*
>   Send {expr} over JSON channel {handle}.  See |channel-use|.
>   
>   When {callback} is given returns immediately.  Without
> --- 2677,2697 
>   {address} has the form "hostname:port", e.g.,
>   "localhost:8765".
>   
> ! If {argdict} is given it must be a |Directory|.  The optional
> ! items are:
> ! mode"raw" or "json".
> ! Default "json".
> ! callbackfunction to call for requests with a zero
> ! sequence number.  See |channel-callback|.
> ! Default: none.
> ! waittimeSpecify connect timeout as milliseconds.
> ! Negative means forever.
> ! Default: 0.
> ! timeout Specify response read timeout value as
> ! milliseconds. 
> ! Default: 2000.
>   
> ! ch_sendexpr({handle}, {expr} [, {callback}])*ch_sendexpr()*
>   Send {expr} over JSON channel {handle}.  See |channel-use|.
>   
>   When {callback} is given returns immediately.  Without
> *** ../vim-7.4.1262/runtime/doc/channel.txt   2016-01-31 20:24:09.970066843 
> +0100
> --- runtime/doc/channel.txt   2016-02-05 22:13:51.287732962 +0100
> ***
> *** 1,4 
> ! *channel.txt*  For Vim version 7.4.  Last change: 2016 Jan 31
>   
>   
> VIM REFERENCE MANUALby Bram Moolenaar
> --- 1,4 
> ! *channel.txt*  For Vim version 7.4.  Last change: 2016 Feb 05
>   
>   
> VIM REFERENCE MANUALby Bram Moolenaar
> ***
> *** 11,17 
>   Vim uses channels to communicate with other processes.
>   A channel uses a socket.*socket-interface*
>   
> ! Vim current supports up to 10 simultanious channels.
>   The Netbeans interface also uses a channel. |netbeans|
>   
>   1. Demo |channel-demo|
> --- 11,17 
>   

Re: Patch 7.4.1353

2016-03-15 Fir de Conversatie Marslo Jiao
On Thursday, 18 February 2016 13:58:47 UTC-8, Bram Moolenaar  wrote:
> Patch 7.4.1353
> Problem:Test_connect_waittime is skipped for MS-Windows.
> Solution:   Add the test back, it works now.
> Files:  src/testdir/test_channel.vim
> 
> 
> *** ../vim-7.4.1352/src/testdir/test_channel.vim  2016-02-18 
> 22:23:21.173660406 +0100
> --- src/testdir/test_channel.vim  2016-02-18 22:55:42.037193693 +0100
> ***
> *** 268,277 
>   
>   " Test that trying to connect to a non-existing port fails quickly.
>   func Test_connect_waittime()
> -   if !has('unix')
> - " TODO: Make this work again for MS-Windows.
> - return
> -   endif
> call ch_log('Test_connect_waittime()')
> let start = reltime()
> let handle = ch_open('localhost:9876', s:chopt)
> --- 268,273 
> *** ../vim-7.4.1352/src/version.c 2016-02-18 22:25:37.468230944 +0100
> --- src/version.c 2016-02-18 22:57:51.127835583 +0100
> ***
> *** 749,750 
> --- 749,752 
>   {   /* Add new patch number below this line */
> + /**/
> + 1353,
>   /**/
> 
> -- 
> FATHER: One day, lad, all this will be yours ...
> PRINCE: What - the curtains?
>  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
> 
>  /// 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///

Since 7.4.1306, vim.exe and gvim.exe cannot be built. Do you know why? and is 
this my environment error?

--
Here is my build command:
  > make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 
DYNAMIC_PYTHON=yes PYTHON_VER=27 
PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 DYNAMIC_PYTHON3=yes 
PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes 
USERNAME=Marslo.Jiao USERDOMAIN=China GUI=yes
  > make -B -f Make_cyg.mak PYTHON=/cygdrive/c/Marslo/MyProgramFiles/Python27 
DYNAMIC_PYTHON=yes PYTHON_VER=27 
PYTHON3=/cygdrive/c/Marslo/MyProgramFiles/Python35 DYNAMIC_PYTHON3=yes 
PYTHON3_VER=35 FEATURES=huge IME=yes GIME=yes MBYTE=yes CSCOPE=yes 
USERNAME=Marslo.Jiao USERDOMAIN=China GUI=no

---
And this is the error log:
>>> for vim.exe: obji386/os_win32.o:os_win32.c:(.text+0x64df): undefined 
>>> reference to `AttachConsole'
collect2: error: ld returned 1 exit status
Make_cyg_ming.mak:806: recipe for target 'vim.exe' failed
make: *** [vim.exe] Error 1

>>> for gvim.exe: 
channel.c: In function ‘channel_open’:
channel.c:426:39: error: ‘EINPROGRESS’ undeclared (first use in this function)
channel.c:426:39: note: each undeclared identifier is reported only once for 
each function it appears in
Make_cyg_ming.mak:890: recipe for target 'gobji386/channel.o' failed
make: *** [gobji386/channel.o] Error 1

-- 
-- 
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 7.4.1576

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1576
Problem:Write error of viminfo file is not handled properly. (Christian
Neukirchen)
Solution:   Check the return value of fclose(). (closes #682)
Files:  src/ex_cmds.c


*** ../vim-7.4.1575/src/ex_cmds.c   2016-03-15 15:09:25.225513841 +0100
--- src/ex_cmds.c   2016-03-15 18:19:54.223369984 +0100
***
*** 2065,2090 
  viminfo_errcnt = 0;
  do_viminfo(fp_in, fp_out, forceit ? 0 : (VIF_WANT_INFO | VIF_WANT_MARKS));
  
! fclose(fp_out);   /* errors are ignored !? */
  if (fp_in != NULL)
  {
fclose(fp_in);
  
/* In case of an error keep the original viminfo file.  Otherwise
 * rename the newly written file.  Give an error if that fails. */
!   if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1)
{
!   ++viminfo_errcnt;
!   EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
}
if (viminfo_errcnt > 0)
mch_remove(tempname);
- 
- #ifdef WIN3264
-   /* If the viminfo file was hidden then also hide the new file. */
-   if (hidden)
-   mch_hide(fname);
- #endif
  }
  
  end:
--- 2065,2094 
  viminfo_errcnt = 0;
  do_viminfo(fp_in, fp_out, forceit ? 0 : (VIF_WANT_INFO | VIF_WANT_MARKS));
  
! if (fclose(fp_out) == EOF)
!   ++viminfo_errcnt;
! 
  if (fp_in != NULL)
  {
fclose(fp_in);
  
/* In case of an error keep the original viminfo file.  Otherwise
 * rename the newly written file.  Give an error if that fails. */
!   if (viminfo_errcnt == 0)
{
!   if (vim_rename(tempname, fname) == -1)
!   {
!   ++viminfo_errcnt;
!   EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
!   }
! # ifdef WIN3264
!   /* If the viminfo file was hidden then also hide the new file. */
!   else if (hidden)
!   mch_hide(fname);
! # endif
}
if (viminfo_errcnt > 0)
mch_remove(tempname);
  }
  
  end:
*** ../vim-7.4.1575/src/version.c   2016-03-15 18:09:53.317599021 +0100
--- src/version.c   2016-03-15 18:22:55.309492951 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1576,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
51. You put a pillow case over your laptop so your lover doesn't see it while
you are pretending to catch your breath.

 /// 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][doc] Update about dll options

2016-03-15 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> After 7.4.1065, 'pythondll' or other similar options can be also used
> on Windows.  However some part of the documents are not updated.  Here
> is a patch for this.

Thanks!

-- 
hundred-and-one symptoms of being an internet addict:
48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
higher."

 /// 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] Fix setting wrong struct size

2016-03-15 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> I found that gui_mch_browseW() uses a wrong struct size.  It uses a size for
> ANSI API instead of Wide API.  Here is a patch:
> 
> --- a/src/gui_w32.c
> +++ b/src/gui_w32.c
> @@ -3710,10 +3710,9 @@ gui_mch_browseW(
>  filterp = convert_filterW(filter);
>  
>  vim_memset(, 0, sizeof(OPENFILENAMEW));
> -#ifdef OPENFILENAME_SIZE_VERSION_400
> +#ifdef OPENFILENAME_SIZE_VERSION_400W
>  /* be compatible with Windows NT 4.0 */
> -/* TODO: what to use for OPENFILENAMEW??? */
> -fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400;
> +fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W;
>  #else
>  fileStruct.lStructSize = sizeof(fileStruct);
>  #endif

Thanks!

-- 
hundred-and-one symptoms of being an internet addict:
49. You never have to deal with busy signals when calling your ISP...because
you never log off.

 /// 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 7.4.1575

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1575
Problem:Using wrong size for struct.
Solution:   Use the size for wide API. (Ken Takata)
Files:  src/gui_w32.c


*** ../vim-7.4.1574/src/gui_w32.c   2016-02-27 18:13:05.236593109 +0100
--- src/gui_w32.c   2016-03-15 18:06:35.891645179 +0100
***
*** 3682,3691 
  filterp = convert_filterW(filter);
  
  vim_memset(, 0, sizeof(OPENFILENAMEW));
! #ifdef OPENFILENAME_SIZE_VERSION_400
  /* be compatible with Windows NT 4.0 */
! /* TODO: what to use for OPENFILENAMEW??? */
! fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400;
  #else
  fileStruct.lStructSize = sizeof(fileStruct);
  #endif
--- 3682,3690 
  filterp = convert_filterW(filter);
  
  vim_memset(, 0, sizeof(OPENFILENAMEW));
! #ifdef OPENFILENAME_SIZE_VERSION_400W
  /* be compatible with Windows NT 4.0 */
! fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W;
  #else
  fileStruct.lStructSize = sizeof(fileStruct);
  #endif
*** ../vim-7.4.1574/src/version.c   2016-03-15 17:43:51.633786581 +0100
--- src/version.c   2016-03-15 18:07:41.178968552 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1575,
  /**/

-- 
CVS sux, men don't like commitment

 /// 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 7.4.1574

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1574
Problem:":undo 0" does not work. (Florent Fayolle)
Solution:   Make it undo all the way. (closes #688)
Files:  src/undo.c, src/testdir/test_undolevels.vim,
src/testdir/test_ex_undo.vim, src/testdir/test_alot.vim


*** ../vim-7.4.1573/src/undo.c  2016-02-23 14:52:31.901232005 +0100
--- src/undo.c  2016-03-15 17:31:58.033185863 +0100
***
*** 2286,2292 
   * Init "closest" to a value we can't reach. */
  if (absolute)
  {
!   target = step;
closest = -1;
  }
  else
--- 2286,2299 
   * Init "closest" to a value we can't reach. */
  if (absolute)
  {
!   if (step == 0)
!   {
!   /* target 0 does not exist, got to 1 and above it. */
!   target = 1;
!   above = TRUE;
!   }
!   else
!   target = step;
closest = -1;
  }
  else
*** ../vim-7.4.1573/src/testdir/test_undolevels.vim 2015-11-30 
21:37:23.596219585 +0100
--- src/testdir/test_undolevels.vim 2016-03-15 17:21:09.339914272 +0100
***
*** 1,7 
  " Tests for 'undolevels'
  
- set nocompatible viminfo+=nviminfo
- 
  func FillBuffer()
for i in range(1,13)
  put=i
--- 1,5 
*** ../vim-7.4.1573/src/testdir/test_ex_undo.vim2016-03-15 
17:41:19.563363217 +0100
--- src/testdir/test_ex_undo.vim2016-03-15 17:38:37.393044650 +0100
***
*** 0 
--- 1,19 
+ " Tests for :undo
+ 
+ func Test_ex_undo()
+   new ex-undo
+   setlocal ul=10
+   exe "normal ione\n\"
+   setlocal ul=10
+   exe "normal itwo\n\"
+   setlocal ul=10
+   exe "normal ithree\n\"
+   call assert_equal(4, line('$'))
+   undo
+   call assert_equal(3, line('$'))
+   undo 1
+   call assert_equal(2, line('$'))
+   undo 0
+   call assert_equal(1, line('$'))
+   quit!
+ endfunc
*** ../vim-7.4.1573/src/testdir/test_alot.vim   2016-03-15 17:10:12.302713149 
+0100
--- src/testdir/test_alot.vim   2016-03-15 17:37:53.829496347 +0100
***
*** 4,9 
--- 4,10 
  source test_assign.vim
  source test_cursor_func.vim
  source test_delete.vim
+ source test_ex_undo.vim
  source test_expand.vim
  source test_feedkeys.vim
  source test_file_perm.vim
*** ../vim-7.4.1573/src/version.c   2016-03-15 17:10:12.306713108 +0100
--- src/version.c   2016-03-15 17:39:57.560213441 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1574,
  /**/

-- 
The real
trick is
this: to
keep the
lines as
short as
possible
and keep
the size
the same
yet free
from the
need for
hyphena-
Dammit!!  (Matthew Winn)

 /// 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] Fix setting wrong struct size

2016-03-15 Fir de Conversatie Ken Takata
Hi,

I found that gui_mch_browseW() uses a wrong struct size.  It uses a size for
ANSI API instead of Wide API.  Here is a patch:

--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -3710,10 +3710,9 @@ gui_mch_browseW(
 filterp = convert_filterW(filter);
 
 vim_memset(, 0, sizeof(OPENFILENAMEW));
-#ifdef OPENFILENAME_SIZE_VERSION_400
+#ifdef OPENFILENAME_SIZE_VERSION_400W
 /* be compatible with Windows NT 4.0 */
-/* TODO: what to use for OPENFILENAMEW??? */
-fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W;
 #else
 fileStruct.lStructSize = sizeof(fileStruct);
 #endif


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.


Re: [patch] Support D reordering in the GUI tab pages line

2016-03-15 Fir de Conversatie Ken Takata
Hi,

2015/11/24 Tue 23:19:13 UTC+9 Bram Moolenaar wrote:
> Ken Takata wrote:
> 
> > I'm afraid that you are missing the following patch because the todo item is
> > not updated:
> > https://groups.google.com/d/msg/vim_dev/_X0cpMreBiw/n4juz5_eBAAJ
> > 
> > > BTW, Below is also need to be modified, so that, Abe fixed this.
> > > > Patch for drag reordering of GUI tab pages reordering.
> > > > (Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
> > > 
> > > https://gist.github.com/nocd5/165286495c782b815b94
> > 
> > The tabline-dnd patch needed to be updated after 7.4.709, and Masamichi Abe
> > did it. I confirmed that Masamichi's latest patch works fine with 7.4.936
> > (both on Windows and Linux).
> > https://gist.github.com/nocd5/165286495c782b815b94
> 
> I'll add the github link to the todo item.

I have updated the tabline-dnd patch to support GTK3.
Please check the attached patch.

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  7bea1e7e626163c886836db1f838da0324a126c6

diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3489,6 +3489,33 @@ on_select_tab(
 }
 
 /*
+ * Handle reordering the tabs (using D).
+ */
+static void
+on_tab_reordered(
+	GtkNotebook	*notebook UNUSED,
+# if GTK_CHECK_VERSION(3,0,0)
+	gpointer	*page UNUSED,
+# else
+	GtkNotebookPage *page UNUSED,
+# endif
+	gint		idx,
+	gpointer	data UNUSED)
+{
+if (!ignore_tabline_evt)
+{
+	if ((tabpage_index(curtab) - 1) < idx)
+	{
+	tabpage_move(idx + 1);
+	}
+	else
+	{
+	tabpage_move(idx);
+	}
+}
+}
+
+/*
  * Show or hide the tabline.
  */
 void
@@ -3574,6 +3601,9 @@ gui_mch_update_tabline(void)
 		page,
 		event_box,
 		nr++);
+	gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline),
+		page,
+		TRUE);
 	}
 
 	event_box = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page);
@@ -4007,14 +4037,19 @@ gui_mch_init(void)
 # endif
 	gtk_container_add(GTK_CONTAINER(event_box), label);
 	gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, event_box);
+	gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline), page, TRUE);
 }
 
 # if GTK_CHECK_VERSION(3,0,0)
 g_signal_connect(G_OBJECT(gui.tabline), "switch-page",
 		 G_CALLBACK(on_select_tab), NULL);
+g_signal_connect(G_OBJECT(gui.tabline), "page-reordered",
+		 G_CALLBACK(on_tab_reordered), NULL);
 # else
 gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
 		   GTK_SIGNAL_FUNC(on_select_tab), NULL);
+gtk_signal_connect(GTK_OBJECT(gui.tabline), "page-reordered",
+		   GTK_SIGNAL_FUNC(on_tab_reordered), NULL);
 # endif
 
 /* Create a popup menu for the tab line and connect it. */
diff --git a/src/gui_w32.c b/src/gui_w32.c
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -8506,6 +8506,34 @@ initialise_tabline(void)
 # endif
 }
 
+/*
+ * Get tabpage_T from POINT.
+ */
+static tabpage_T *
+GetTabFromPoint(
+HWNDhWnd,
+POINT   pt)
+{
+tabpage_T	*ptp = NULL;
+
+if (gui_mch_showing_tabline())
+{
+	TCHITTESTINFO htinfo;
+	htinfo.pt = pt;
+	/* ignore if a window under cusor is not tabcontrol. */
+	if (s_tabhwnd == hWnd)
+	{
+	int idx = TabCtrl_HitTest(s_tabhwnd, );
+	if (idx != -1)
+		ptp = find_tabpage(idx + 1);
+	}
+}
+return ptp;
+}
+
+static POINT	s_pt = {0, 0};
+static HCURSOR  s_hCursor = NULL;
+
 static LRESULT CALLBACK
 tabline_wndproc(
 HWND hwnd,
@@ -8513,7 +8541,73 @@ tabline_wndproc(
 WPARAM wParam,
 LPARAM lParam)
 {
+POINT	pt;
+tabpage_T	*tp;
+RECT	rect;
+int		nCenter;
+int		idx0;
+int		idx1;
+
 HandleMouseHide(uMsg, lParam);
+
+switch (uMsg)
+{
+	case WM_LBUTTONDOWN:
+	{
+		s_pt.x = GET_X_LPARAM(lParam);
+		s_pt.y = GET_Y_LPARAM(lParam);
+		SetCapture(hwnd);
+		s_hCursor = GetCursor(); /* backup default cursor */
+		break;
+	}
+	case WM_MOUSEMOVE:
+	if (GetCapture() == hwnd
+		&& ((wParam & MK_LBUTTON)) != 0)
+	{
+		pt.x = GET_X_LPARAM(lParam);
+		pt.y = s_pt.y;
+		if (abs(pt.x - s_pt.x) > GetSystemMetrics(SM_CXDRAG))
+		{
+		SetCursor(LoadCursor(NULL, IDC_SIZEWE));
+
+		tp = GetTabFromPoint(hwnd, pt);
+		if (tp != NULL)
+		{
+			idx0 = tabpage_index(curtab) - 1;
+			idx1 = tabpage_index(tp) - 1;
+
+			TabCtrl_GetItemRect(hwnd, idx1, );
+			nCenter = rect.left + (rect.right - rect.left) / 2;
+
+			/* Check if the mouse cursor goes over the center of
+			 * the next tab to prevent "flickering". */
+			if ((idx0 < idx1) 

Patch 7.4.15

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1573
Problem:Tests get stuck at the more prompt.
Solution:   Move the backspace test out of test_alot.
Files:  src/testdir/test_alot.vim, src/testdir/Make_all.mak


*** ../vim-7.4.1572/src/testdir/test_alot.vim   2016-03-15 16:35:23.504279033 
+0100
--- src/testdir/test_alot.vim   2016-03-15 17:06:52.968771766 +0100
***
*** 2,8 
  " This makes testing go faster, since Vim doesn't need to restart.
  
  source test_assign.vim
- source test_backspace_opt.vim
  source test_cursor_func.vim
  source test_delete.vim
  source test_expand.vim
--- 2,7 
*** ../vim-7.4.1572/src/testdir/Make_all.mak2016-03-15 14:10:54.478025751 
+0100
--- src/testdir/Make_all.mak2016-03-15 17:07:15.732536683 +0100
***
*** 170,175 
--- 170,176 
  # Keep test_alot.res as the last one, sort the others.
  NEW_TESTS = test_arglist.res \
test_assert.res \
+   test_backspace_opt.res \
test_cdo.res \
test_channel.res \
test_hardcopy.res \
*** ../vim-7.4.1572/src/version.c   2016-03-15 16:53:23.001134942 +0100
--- src/version.c   2016-03-15 17:07:32.248366119 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1573,
  /**/

-- 
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 -- 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][doc] Update about dll options

2016-03-15 Fir de Conversatie Ken Takata
Hi,

After 7.4.1065, 'pythondll' or other similar options can be also used on 
Windows.
However some part of the documents are not updated.  Here is a patch for 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 655b74e20f72b15f112378a81010752fe03d7a32
# Parent  a1be3dbd8d1e43af333fba34425f1c34fd03ed09

diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -410,13 +410,20 @@ This means that Vim will search for the 
 when needed.  When you don't use the Lua interface you don't need it, thus
 you can use Vim without this file.
 
-On MS-Windows to use the Lua interface the Lua DLL must be in your search path.
-In a console window type "path" to see what directories are used.  The version
-of the DLL must match the Lua version Vim was compiled with.
 
-On Unix the 'luadll' option can be used to specify the Lua shared library file
-instead of DYNAMIC_LUA_DLL file what was specified at compile time.  The
-version of the shared library must match the Lua version Vim was compiled with.
+MS-Windows ~
+
+To use the Lua interface the Lua DLL must be in your search path.  In a
+console window type "path" to see what directories are used.  The 'luadll'
+option can be also used to specify the Lua DLL.  The version of the DLL must
+match the Lua version Vim was compiled with.
+
+
+Unix ~
+
+The 'luadll' option can be used to specify the Lua shared library file instead
+of DYNAMIC_LUA_DLL file what was specified at compile time.  The version of
+the shared library must match the Lua version Vim was compiled with.
 
 
 ==
diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt
--- a/runtime/doc/if_perl.txt
+++ b/runtime/doc/if_perl.txt
@@ -284,7 +284,8 @@ used for building Vim.
 To use the Perl interface the Perl DLL must be in your search path.
 If Vim reports it cannot find the perl512.dll, make sure your $PATH includes
 the directory where it is located.  The Perl installer normally does that.
-In a console window type "path" to see what directories are used.
+In a console window type "path" to see what directories are used.  The
+'perldll' option can be also used to specify the Perl DLL.
 
 The name of the DLL must match the Perl version Vim was compiled with.
 Currently the name is "perl512.dll".  That is for Perl 5.12.  To know for
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -686,18 +686,24 @@ This means that Vim will search for the 
 when needed.  When you don't use the Python interface you don't need it, thus
 you can use Vim without this file.
 
-On MS-Windows to use the Python interface the Python DLL must be in your search
-path.  In a console window type "path" to see what directories are used.
+
+MS-Windows ~
+
+To use the Python interface the Python DLL must be in your search path.  In a
+console window type "path" to see what directories are used.  The 'pythondll'
+or 'pythonthreedll' option can be also used to specify the Python DLL.
 
 The name of the DLL must match the Python version Vim was compiled with.
 Currently the name is "python24.dll".  That is for Python 2.4.  To know for
 sure edit "gvim.exe" and search for "python\d*.dll\c".
 
-On Unix the 'pythondll' or 'pythonthreedll' option can be used to specify the
-Python shared library file instead of DYNAMIC_PYTHON_DLL or
-DYNAMIC_PYTHON3_DLL file what were specified at compile time.  The version of
-the shared library must match the Python 2.x or Python 3 version Vim was
-compiled with.
+
+Unix ~
+
+The 'pythondll' or 'pythonthreedll' option can be used to specify the Python
+shared library file instead of DYNAMIC_PYTHON_DLL or DYNAMIC_PYTHON3_DLL file
+what were specified at compile time.  The version of the shared library must
+match the Python 2.x or Python 3 version Vim was compiled with.
 
 ==
 10. Python 3		*python3*
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -199,6 +199,7 @@ This means that Vim will search for the 
 when needed.  When you don't use the Ruby interface you don't need it, thus
 you can use Vim even though this library file is not on your system.
 
+
 MS-Windows ~
 
 You need to install the right version of Ruby for this to work.  You can find
@@ -207,7 +208,8 @@ 

Patch 7.4.1572

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1572
Problem:Setting 'compatible' in test influences following tests.
Solution:   Turn 'compatible' off again.
Files:  src/testdir/test_backspace_opt.vim


*** ../vim-7.4.1571/src/testdir/test_backspace_opt.vim  2016-01-02 
21:31:35.810226773 +0100
--- src/testdir/test_backspace_opt.vim  2016-03-15 16:50:44.438771787 +0100
***
*** 53,58 
--- 53,59 
" Cleared when 'compatible' is set
set compatible
call assert_equal('', )
+   set nocompatible
  endfunc
  
  " vim: tabstop=2 shiftwidth=0 expandtab
*** ../vim-7.4.1571/src/version.c   2016-03-15 16:35:23.504279033 +0100
--- src/version.c   2016-03-15 16:52:10.437884031 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1572,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."

 /// 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] tag-jump usability improvement in the help.

2016-03-15 Fir de Conversatie Bram Moolenaar

Hirohito Higashi wrote:

> 2016-3-15(Tue) 21:54:57 UTC+9 h_east:
> > Hi Bram,
> > 
> > 2016-3-15(Tue) 21:44:36 UTC+9 Bram Moolenaar:
> > > Hirohito Higashi wrote:
> > > 
> > > > Hi Bram and list,
> > > > 
> > > > Sometimes tag-jump failed in the help.
> > > > Because, the help's 'iskeyword' option contains `(`.
> > > > 
> > > > Failed case #1:
> > > >   :h E29
> > > >   /textwidth
> > > >   
> > > > 
> > > >   E149: Sorry, no help for ('textwidth'
> > > > 
> > > > 
> > > > Failed case #2:
> > > >   :h viminfo-%
> > > >   /buflisted
> > > >   
> > > > 
> > > >   E149: Sorry, no help for ('buflisted'),
> > > > 
> > > > 
> > > > I wrote a patch.
> > > > When tag starts `('` skip `(` at ":help".
> > > > It is very useful :-)
> > > > Please include an attached patch.
> > > 
> > > That is useful, thanks.
> > > 
> > > We should have a test for this complicated stuff...
> > 
> > Thanks for including my patch!
> > I begin to write a test from now.
> > Please wait one hour.
> 
> Here is a test.

Thanks.  I assume you used "exec" to work around a highlighting problem.
We don't need it for "helpclose".

> P.S.
> Hopefully, following patch also want to include. 
> https://groups.google.com/d/msg/vim_dev/fH5gsRE-EjE/PtJD1gL-FwAJ

Already did, will go out with runtime file updates.


-- 
hundred-and-one symptoms of being an internet addict:
42. Your virtual girlfriend finds a new net sweetheart with a larger bandwidth.

 /// 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 7.4.1571

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1571
Problem:No test for ":help".
Solution:   Add a test for what 7.4.1568 fixed. (Higashi Higashi)
Files:  src/testdir/test_alot.vim, src/testdir/test_help_tagjump.vim


*** ../vim-7.4.1570/src/testdir/test_alot.vim   2016-03-14 23:04:49.702923020 
+0100
--- src/testdir/test_alot.vim   2016-03-15 16:27:28.073187180 +0100
***
*** 9,14 
--- 9,15 
  source test_feedkeys.vim
  source test_file_perm.vim
  source test_glob2regpat.vim
+ source test_help_tagjump.vim
  source test_join.vim
  source test_lispwords.vim
  source test_menu.vim
*** ../vim-7.4.1570/src/testdir/test_help_tagjump.vim   2016-03-15 
16:35:09.252426190 +0100
--- src/testdir/test_help_tagjump.vim   2016-03-15 16:34:03.045109785 +0100
***
*** 0 
--- 1,18 
+ " Tests for :help! {subject}
+ 
+ func Test_help_tagjump()
+   help
+   call assert_equal("help", )
+   call assert_true(getline('.') =~ '\*help.txt\*')
+   helpclose
+ 
+   exec "help! ('textwidth'"
+   call assert_equal("help", )
+   call assert_true(getline('.') =~ "\\*'textwidth'\\*")
+   helpclose
+ 
+   exec "help! ('buflisted'),"
+   call assert_equal("help", )
+   call assert_true(getline('.') =~ "\\*'buflisted'\\*")
+   helpclose
+ endfunc
*** ../vim-7.4.1570/src/version.c   2016-03-15 15:09:25.225513841 +0100
--- src/version.c   2016-03-15 16:28:46.928373241 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1571,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
43. You tell the kids they can't use the computer because "Daddy's got work to
do" and you don't even have a job.

 /// 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 7.4.1570

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1570
Problem:There is no way to avoid the message when editing a file.
Solution:   Add the "F" flag to 'shortmess'. (Shougo, closes #686)
Files:  runtime/doc/options.txt, src/buffer.c, src/ex_cmds.c,
src/option.h


*** ../vim-7.4.1569/runtime/doc/options.txt 2016-02-21 23:01:47.449323306 
+0100
--- runtime/doc/options.txt 2016-03-15 15:04:45.540421778 +0100
***
*** 6516,6522 
  c don't give |ins-completion-menu| messages.  For example,
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
"Pattern not found", "Back at original", etc.
! q use "recording" instead of "recording @a"
  
This gives you the opportunity to avoid that a change between buffers
requires you to hit , but still gives as useful a message as
--- 6533,6541 
  c don't give |ins-completion-menu| messages.  For example,
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
"Pattern not found", "Back at original", etc.
! q use "recording" instead of "recording @a"
! F don't give the file info when editing a file, like `:silent`
!   was used for the command
  
This gives you the opportunity to avoid that a change between buffers
requires you to hit , but still gives as useful a message as
*** ../vim-7.4.1569/src/buffer.c2016-03-08 12:56:29.24462 +0100
--- src/buffer.c2016-03-15 15:08:02.718371747 +0100
***
*** 139,152 
--- 139,157 
  #endif
 )
  {
+   int old_msg_silent = msg_silent;
+ 
  #ifdef FEAT_NETBEANS_INTG
int oldFire = netbeansFireChanges;
  
netbeansFireChanges = 0;
  #endif
+   if (shortmess(SHM_FILEINFO))
+   msg_silent = 1;
retval = readfile(curbuf->b_ffname, curbuf->b_fname,
  (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap,
  flags | READ_NEW);
+   msg_silent = old_msg_silent;
  #ifdef FEAT_NETBEANS_INTG
netbeansFireChanges = oldFire;
  #endif
*** ../vim-7.4.1569/src/ex_cmds.c   2016-03-15 13:44:07.938807343 +0100
--- src/ex_cmds.c   2016-03-15 15:08:49.933880808 +0100
***
*** 2605,2611 
return;
  }
  /* print full file name if :cd used */
! fileinfo(FALSE, FALSE, eap->forceit);
  }
  
  /*
--- 2605,2612 
return;
  }
  /* print full file name if :cd used */
! if (!shortmess(SHM_FILEINFO))
!   fileinfo(FALSE, FALSE, eap->forceit);
  }
  
  /*
***
*** 3884,3890 
msg_scroll = msg_scroll_save;
msg_scrolled_ign = TRUE;
  
!   fileinfo(FALSE, TRUE, FALSE);
  
msg_scrolled_ign = FALSE;
  }
--- 3885,3892 
msg_scroll = msg_scroll_save;
msg_scrolled_ign = TRUE;
  
!   if (!shortmess(SHM_FILEINFO))
!   fileinfo(FALSE, TRUE, FALSE);
  
msg_scrolled_ign = FALSE;
  }
*** ../vim-7.4.1569/src/option.h2016-03-08 22:47:05.622161011 +0100
--- src/option.h2016-03-15 14:27:50.051442630 +0100
***
*** 214,220 
  #define SHM_INTRO 'I' /* intro messages */
  #define SHM_COMPLETIONMENU  'c'   /* completion menu messages */
  #define SHM_RECORDING 'q' /* short recording message */
! #define SHM_ALL   "rmfixlnwaWtToOsAIcq" /* all possible flags for 
'shm' */
  
  /* characters for p_go: */
  #define GO_ASEL   'a' /* autoselect */
--- 214,221 
  #define SHM_INTRO 'I' /* intro messages */
  #define SHM_COMPLETIONMENU  'c'   /* completion menu messages */
  #define SHM_RECORDING 'q' /* short recording message */
! #define SHM_FILEINFO  'F' /* no file info messages */
! #define SHM_ALL   "rmfixlnwaWtToOsAIcqF" /* all possible flags 
for 'shm' */
  
  /* characters for p_go: */
  #define GO_ASEL   'a' /* autoselect */
*** ../vim-7.4.1569/src/version.c   2016-03-15 14:10:54.478025751 +0100
--- src/version.c   2016-03-15 14:28:48.466835550 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1570,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
40. You tell the cab driver you live at
http://123.elm.street/house/bluetrim.html
41. You actually try that 123.elm.street address.

 /// 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 

Re: [vim] Add "Don't give the file editing message" flag in shortmess option. (#686)

2016-03-15 Fir de Conversatie h_east
Hi Bram,

2016-3-15(Tue) 22:31:01 UTC+9 Bram Moolenaar:
> Shougo wrote:
> 
> 
> 
> > It adds F flag in shortmess option.
> 
> > It is "Don't give the file editing message" flag.
> 
> > Because, it is useless if you use statusline feature.
> 
> > You can view, comment on, or merge this pull request online at:
> 
> > 
> 
> >   https://github.com/vim/vim/pull/686
> 
> > 
> 
> > -- Commit Summary --
> 
> > 
> 
> >   * Add "Don't give the file editing message" flag in shortmess option.
> 
> > 
> 
> > -- File Changes --
> 
> > 
> 
> > M runtime/doc/options.txt (1)
> 
> > M src/buffer.c (6)
> 
> > M src/ex_cmds.c (6)
> 
> > M src/option.h (3)
> 
> 
> 
> Thanks, I'll include it.


src/buffer.c
@@ -139,14 +139,20 @@ open_buffer(
  #endif
 )
  {
 +int old_msg_silent = msg_silent;
 +
  #ifdef FEAT_NETBEANS_INTG
int oldFire = netbeansFireChanges;
  
netbeansFireChanges = 0;
  #endif
 +if (shortmess(SHM_FILEINFO))
 +msg_silent = 1;
retval = readfile(curbuf->b_ffname, curbuf->b_fname,
  (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap,
  flags | READ_NEW);
 +if (shortmess(SHM_FILEINFO))
 +msg_silent = old_msg_silent;
  #ifdef FEAT_NETBEANS_INTG
netbeansFireChanges = oldFire;
  #endif


Once because the `shortmess(SHM_FILEINFO)` of the results are likely to change 
in autocmd in the readfile(), It should set to the variable.


int has_shm_fileinfo = shortmess(SHM_FILEINFO);

if (has_shm_fileinfo)
msg_silent = 1;
retval = readfile(...);
if (has_shm_fileinfo)
msg_silent = old_msg_silent;

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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] tag-jump usability improvement in the help.

2016-03-15 Fir de Conversatie h_east
Hi Bram,

2016-3-15(Tue) 21:54:57 UTC+9 h_east:
> Hi Bram,
> 
> 2016-3-15(Tue) 21:44:36 UTC+9 Bram Moolenaar:
> > Hirohito Higashi wrote:
> > 
> > > Hi Bram and list,
> > > 
> > > Sometimes tag-jump failed in the help.
> > > Because, the help's 'iskeyword' option contains `(`.
> > > 
> > > Failed case #1:
> > >   :h E29
> > >   /textwidth
> > >   
> > > 
> > >   E149: Sorry, no help for ('textwidth'
> > > 
> > > 
> > > Failed case #2:
> > >   :h viminfo-%
> > >   /buflisted
> > >   
> > > 
> > >   E149: Sorry, no help for ('buflisted'),
> > > 
> > > 
> > > I wrote a patch.
> > > When tag starts `('` skip `(` at ":help".
> > > It is very useful :-)
> > > Please include an attached patch.
> > 
> > That is useful, thanks.
> > 
> > We should have a test for this complicated stuff...
> 
> Thanks for including my patch!
> I begin to write a test from now.
> Please wait one hour.

Here is a test.

P.S.
Hopefully, following patch also want to include. 
https://groups.google.com/d/msg/vim_dev/fH5gsRE-EjE/PtJD1gL-FwAJ

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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.
diff --git a/src/Makefile b/src/Makefile
index a52a1f3..17f7c5c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2008,6 +2008,7 @@ test_arglist \
 	test_file_perm \
 	test_glob2regpat \
 	test_hardcopy \
+	test_help_tagjump \
 	test_history \
 	test_increment \
 	test_join \
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 55502ba..f4a1450 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -9,6 +9,7 @@ source test_expand.vim
 source test_feedkeys.vim
 source test_file_perm.vim
 source test_glob2regpat.vim
+source test_help_tagjump.vim
 source test_join.vim
 source test_lispwords.vim
 source test_menu.vim
diff --git a/src/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim
new file mode 100644
index 000..72dacd9
--- /dev/null
+++ b/src/testdir/test_help_tagjump.vim
@@ -0,0 +1,13 @@
+" Tests for :help! {subject}
+
+func Test_help_tagjump()
+  exec "help! ('textwidth'"
+  call assert_equal("help", )
+  exec "helpclose"
+
+  exec "help! ('buflisted'),"
+  call assert_equal("help", )
+  exec "helpclose"
+endfunc
+
+" vim: tabstop=2 shiftwidth=0 expandtab


Patch 7.4.1569

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1569
Problem:Using old style tests for quickfix.
Solution:   Change them to new style tests. (Yegappan Lakshmanan)
Files:  src/testdir/Make_all.mak, src/testdir/test106.in,
src/testdir/test106.ok, src/testdir/test_qf_title.in,
src/testdir/test_qf_title.ok, src/testdir/test_quickfix.vim


*** ../vim-7.4.1568/src/testdir/Make_all.mak2016-03-13 18:06:59.528803729 
+0100
--- src/testdir/Make_all.mak2016-03-15 14:05:34.421368836 +0100
***
*** 87,93 
test103.out \
test104.out \
test105.out \
-   test106.out \
test107.out \
test108.out \
test_autocmd_option.out \
--- 87,92 
***
*** 110,116 
test_match_conceal.out \
test_nested_function.out \
test_options.out \
-   test_qf_title.out \
test_ruby.out \
test_search_mbyte.out \
test_signs.out \
--- 109,114 
*** ../vim-7.4.1568/src/testdir/test106.in  2014-03-12 19:41:37.100948866 
+0100
--- src/testdir/test106.in  1970-01-01 01:00:00.0 +0100
***
*** 1,16 
- Tests for errorformat.  vim: set ft=vim ts=8 :
- 
- STARTTEST
- :so small.vim
- :if !has('quickfix') | e! test.ok | wq! test.out | endif
- :set efm=%%m,%%m,%+%.%#,%-%.%#
- :cgetexpr ['', '', '']
- :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
- :cgetexpr ['', '', '', '']
- :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
- :cgetexpr ['', '', '', '', '', '']
- :$put =strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
- :/^Results/,$wq! test.out
- ENDTEST
- 
- Results of test106:
--- 0 
*** ../vim-7.4.1568/src/testdir/test106.ok  2014-03-12 19:41:37.100948866 
+0100
--- src/testdir/test106.ok  1970-01-01 01:00:00.0 +0100
***
*** 1,4 
- Results of test106:
- [['W', 1], ['E^@', 1]]
- [['W', 1], ['E^@', 1]]
- [['W', 1], ['', 0], ['E^@', 1], ['', 0]]
--- 0 
*** ../vim-7.4.1568/src/testdir/test_qf_title.in2014-07-23 
15:54:43.443903036 +0200
--- src/testdir/test_qf_title.in1970-01-01 01:00:00.0 +0100
***
*** 1,18 
- Tests for quickfix window's title vim: set ft=vim :
- 
- STARTTEST
- :so small.vim
- :if !has('quickfix') | e! test.ok | wq! test.out | endif
- :set efm=%E%f:%l:%c:%m
- :cgetexpr ['file:1:1:message']
- :let qflist=getqflist()
- :call setqflist(qflist, 'r')
- :copen
- :let g:quickfix_title=w:quickfix_title
- :wincmd p
- :$put =g:quickfix_title
- :/^Results/,$w test.out
- :qa!
- ENDTEST
- 
- Results of test_qf_title:
--- 0 
*** ../vim-7.4.1568/src/testdir/test_qf_title.ok2014-07-23 
15:54:43.443903036 +0200
--- src/testdir/test_qf_title.ok1970-01-01 01:00:00.0 +0100
***
*** 1,2 
- Results of test_qf_title:
- :setqflist()
--- 0 
*** ../vim-7.4.1568/src/testdir/test_quickfix.vim   2016-01-22 
22:44:06.373407684 +0100
--- src/testdir/test_quickfix.vim   2016-03-15 14:05:34.421368836 +0100
***
*** 316,318 
--- 316,368 
augroup END
augroup! QfBufWinEnter
  endfunc
+ 
+ function XqfTitleTests(cchar)
+   let Xgetexpr = a:cchar . 'getexpr'
+   if a:cchar == 'c'
+ let Xgetlist = 'getqflist()'
+   else
+ let Xgetlist = 'getloclist(0)'
+   endif
+   let Xopen = a:cchar . 'open'
+   let Xclose = a:cchar . 'close'
+ 
+   exe Xgetexpr . " ['file:1:1:message']"
+   exe 'let l = ' . Xgetlist
+   if a:cchar == 'c'
+ call setqflist(l, 'r')
+   else
+ call setloclist(0, l, 'r')
+   endif
+ 
+   exe Xopen
+   if a:cchar == 'c'
+ let title = ':setqflist()'
+   else
+ let title = ':setloclist()'
+   endif
+   call assert_equal(title, w:quickfix_title)
+   exe Xclose
+ endfunction
+ 
+ " Tests for quickfix window's title
+ function Test_qf_title()
+ call XqfTitleTests('c')
+ call XqfTitleTests('l')
+ endfunction
+ 
+ " Tests for 'errorformat'
+ function Test_efm()
+   let save_efm = 
+   set efm=%%m,%%m,%+%.%#,%-%.%#
+   cgetexpr ['', '', '']
+   let l = strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
+   call assert_equal("[['W', 1], ['E^@', 1]]", l)
+   cgetexpr ['', '', '', '']
+   let l = strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
+   call assert_equal("[['W', 1], ['E^@', 1]]", l)
+   cgetexpr ['', '', '', '', '', '']
+   let l = strtrans(string(map(getqflist(), '[v:val.text, v:val.valid]')))
+   call assert_equal("[['W', 1], ['', 0], ['E^@', 1], ['', 0]]", l)
+   let  = save_efm
+ endfunction
*** ../vim-7.4.1568/src/version.c   2016-03-15 13:44:07.938807343 +0100
--- src/version.c   2016-03-15 14:06:40.136682392 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1569,
 

Re: Patch to convert two quickfix tests to new style tests

2016-03-15 Fir de Conversatie Bram Moolenaar

Yegappan wrote:

> The attached patch converts two old style quickfix related tests
> to new style tests.

Thanks!

-- 
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and decide to Netscape before you landscape.

 /// 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] tag-jump usability improvement in the help.

2016-03-15 Fir de Conversatie h_east
Hi Bram,

2016-3-15(Tue) 21:44:36 UTC+9 Bram Moolenaar:
> Hirohito Higashi wrote:
> 
> > Hi Bram and list,
> > 
> > Sometimes tag-jump failed in the help.
> > Because, the help's 'iskeyword' option contains `(`.
> > 
> > Failed case #1:
> >   :h E29
> >   /textwidth
> >   
> > 
> >   E149: Sorry, no help for ('textwidth'
> > 
> > 
> > Failed case #2:
> >   :h viminfo-%
> >   /buflisted
> >   
> > 
> >   E149: Sorry, no help for ('buflisted'),
> > 
> > 
> > I wrote a patch.
> > When tag starts `('` skip `(` at ":help".
> > It is very useful :-)
> > Please include an attached patch.
> 
> That is useful, thanks.
> 
> We should have a test for this complicated stuff...

Thanks for including my patch!
I begin to write a test from now.
Please wait one hour.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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] tag-jump usability improvement in the help.

2016-03-15 Fir de Conversatie Bram Moolenaar

Hirohito Higashi wrote:

> Hi Bram and list,
> 
> Sometimes tag-jump failed in the help.
> Because, the help's 'iskeyword' option contains `(`.
> 
> Failed case #1:
>   :h E29
>   /textwidth
>   
> 
>   E149: Sorry, no help for ('textwidth'
> 
> 
> Failed case #2:
>   :h viminfo-%
>   /buflisted
>   
> 
>   E149: Sorry, no help for ('buflisted'),
> 
> 
> I wrote a patch.
> When tag starts `('` skip `(` at ":help".
> It is very useful :-)
> Please include an attached patch.

That is useful, thanks.

We should have a test for this complicated stuff...

-- 
George:  "I just got a new set of golf clubs for my wife!"
  John:  "Great trade!"

 /// 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 7.4.1568

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1568
Problem:Using CTRL-] in help on option in parentheses doesn't work.
Solution:   Skip the "(" in "('". (Hirohito Higashi)
Files:  src/ex_cmds.c


*** ../vim-7.4.1567/src/ex_cmds.c   2016-03-14 23:45:30.893239195 +0100
--- src/ex_cmds.c   2016-03-15 13:40:24.417138528 +0100
***
*** 6114,6119 
--- 6114,6124 
|| (arg[0] == '\\' && arg[1] == '{'))
  *d++ = '\\';
  
+ /*
+  * If tag starts with "('", skip the "(". Fixes CTRL-] on ('option'.
+  */
+ if (*arg == '(' && arg[1] == '\'')
+ arg++;
  for (s = arg; *s; ++s)
  {
/*
*** ../vim-7.4.1567/src/version.c   2016-03-15 13:33:50.709244886 +0100
--- src/version.c   2016-03-15 13:41:19.068568540 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1568,
  /**/

-- 
Light travels faster than sound.  This is why some people
appear bright until you hear them speak

 /// 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] fixed crash in f_assert_fails(...)

2016-03-15 Fir de Conversatie Bram Moolenaar

Dominique wrote:

> afl-fuzz found another crash in vim-7.4.1558:
> 
> $ vim -U NONE -N -c "call assert_fails('l', json_decode('{}'))"
> Vim: Caught deadly signal SEGV
> Vim: Finished.
> Segmentation fault (core dumped)
> 
> Valgrind reports:
> 
> ==4665== Memcheck, a memory error detector
> ==4665== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
> ==4665== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
> ==4665== Command: ./vim -u NONE -N -S c.vim -c qa!
> ==4665==
> ==4665== Invalid read of size 1
> ==4665==at 0x403381C: strstr (in
> /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
> ==4665==by 0x8083E96: f_assert_fails (eval.c:9307)
> ==4665==by 0x80830C6: call_func (eval.c:8798)
> ==4665==by 0x8082B9A: get_func_tv (eval.c:8597)
> ==4665==by 0x807B6CB: ex_call (eval.c:3526)
> ==4665==by 0x80B78EB: do_one_cmd (ex_docmd.c:2921)
> ==4665==by 0x80B4BF7: do_cmdline (ex_docmd.c:1107)
> ==4665==by 0x80B2B42: do_source (ex_cmds2.c:3727)
> ==4665==by 0x80B223A: cmd_source (ex_cmds2.c:3340)
> ==4665==by 0x80B2198: ex_source (ex_cmds2.c:3315)
> ==4665==by 0x80B78EB: do_one_cmd (ex_docmd.c:2921)
> ==4665==by 0x80B4BF7: do_cmdline (ex_docmd.c:1107)
> ==4665==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
> 
> Code in eval.c:
> 
>  9284 static void
>  9285 f_assert_fails(typval_T *argvars, typval_T *rettv UNUSED)
>  9286 {
>  ...
>  9307 if (strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL)
> 
> When crash happens, variable error is NULL at eval.c:9307.
> strstr(...) cannot be called with its 2nd argument being NULL.
> 
> Attached patch fixes the crash, but please check whether
> it's the right way to fix it.

Thanks.  I'll add a test.  We don't need the json_decode() for that.

-- 
I started out with nothing, and I still have most of it.
-- Michael Davis -- "Tonight Show"

 /// 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 7.4.1567

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1567
Problem:Crash in assert_fails().
Solution:   Check for NULL. (Dominique Pelle)  Add a test.
Files:  src/eval.c, src/testdir/test_assert.vim


*** ../vim-7.4.1566/src/eval.c  2016-03-15 13:09:49.756277273 +0100
--- src/eval.c  2016-03-15 13:30:59.927026241 +0100
***
*** 9386,9392 
char_u  buf[NUMBUFLEN];
char*error = (char *)get_tv_string_buf_chk([1], buf);
  
!   if (strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL)
{
prepare_assert_error();
fill_assert_error(, [2], NULL, [1],
--- 9386,9393 
char_u  buf[NUMBUFLEN];
char*error = (char *)get_tv_string_buf_chk([1], buf);
  
!   if (error == NULL
! || strstr((char *)vimvars[VV_ERRMSG].vv_str, error) == NULL)
{
prepare_assert_error();
fill_assert_error(, [2], NULL, [1],
*** ../vim-7.4.1566/src/testdir/test_assert.vim 2016-03-15 12:55:53.789004284 
+0100
--- src/testdir/test_assert.vim 2016-03-15 13:30:38.855246037 +0100
***
*** 62,67 
--- 62,73 
endtry
  endfunc
  
+ func Test_assert_fail_fails()
+   call assert_fails('xxx', {})
+   call assert_true(v:errors[0] =~ "Expected {} but got 'E731:")
+   call remove(v:errors, 0)
+ endfunc
+ 
  
  func Test_user_is_happy()
smile
*** ../vim-7.4.1566/src/version.c   2016-03-15 13:09:49.760277231 +0100
--- src/version.c   2016-03-15 13:18:44.602696880 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1567,
  /**/

-- 
Well, you come from nothing, you go back to nothing...  What have you
lost?  Nothing!
-- Monty Python: The life of Brian

 /// 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] Docs: function-list does not list all assert_* functions

2016-03-15 Fir de Conversatie Bram Moolenaar

Josh Wainwright wrote:

> The list of functions in usr_41.txt does not contain all functions
> added for testing. Patch below adds assert_exception() and
> assert_fails() (also attached as the tabs seem to be removed):

Thanks!

-- 
Don't believe everything you hear or anything you say.

 /// 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 7.4.1566

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1566
Problem:Compiler warning for shadowed variable. (Kazunobu Kuriyama)
Solution:   Remove the inner one.
Files:  src/eval.c


*** ../vim-7.4.1565/src/eval.c  2016-03-15 12:55:53.789004284 +0100
--- src/eval.c  2016-03-15 13:04:44.939458904 +0100
***
*** 8759,8766 
}
if (error == ERROR_NONE && partial->pt_argc > 0)
{
-   int i;
- 
for (argv_clear = 0; argv_clear < partial->pt_argc; ++argv_clear)
copy_tv(>pt_argv[argv_clear], [argv_clear]);
for (i = 0; i < argcount_in; ++i)
--- 8759,8764 
*** ../vim-7.4.1565/src/version.c   2016-03-15 12:55:53.793004243 +0100
--- src/version.c   2016-03-15 13:05:19.883094142 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1566,
  /**/

-- 
Don't read everything you believe.

 /// 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: Another -Wshadow warning on src/eval.c

2016-03-15 Fir de Conversatie Bram Moolenaar

Kazunobu Kuriyama wrote:

> I got a -Wshadow warning on eval.c:
> 
> eval.c: In function 'call_func':
> eval.c:8762:14: warning: declaration of 'i' shadows a previous local
> [-Wshadow]
>   int i;
>   ^
> eval.c:8689:10: note: shadowed declaration is here
>  int  i;
>   ^
> 
> Note that this is different from the one I reported previously and fixed by
> v7.4.1534.

The second declaration can be removed.

-- 
Everybody lies, but it doesn't matter since nobody listens.
-- Lieberman's Law

 /// 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 7.4.1565

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1565
Problem:Crash when assert_equal() runs into a NULL string.
Solution:   Check for NULL. (Dominique) Add a test.
Files:  src/eval.c, src/testdir/test_assert.vim


*** ../vim-7.4.1564/src/eval.c  2016-03-15 12:36:04.413428899 +0100
--- src/eval.c  2016-03-15 12:47:31.078254458 +0100
***
*** 9240,9245 
--- 9240,9251 
  char_u  *p;
  char_u  buf[NUMBUFLEN];
  
+ if (str == NULL)
+ {
+   ga_concat(gap, (char_u *)"NULL");
+   return;
+ }
+ 
  for (p = str; *p != NUL; ++p)
switch (*p)
{
*** ../vim-7.4.1564/src/testdir/test_assert.vim 2016-02-06 20:29:24.357275499 
+0100
--- src/testdir/test_assert.vim 2016-03-15 12:52:14.523294018 +0100
***
*** 48,53 
--- 48,68 
call assert_equal(type([]), type(verrors))
  endfunc
  
+ func Test_compare_fail()
+   let s:v = {}  
+   let s:x = {"a": s:v} 
+   let s:v["b"] = s:x   
+   let s:w = {"c": s:x, "d": ''}
+   try
+ call assert_equal(s:w, '')
+   catch
+ call assert_exception('E724:')
+ call assert_true(v:errors[0] =~ "Expected NULL but got ''")
+ call remove(v:errors, 0)
+   endtry
+ endfunc
+ 
+ 
  func Test_user_is_happy()
smile
sleep 300m
*** ../vim-7.4.1564/src/version.c   2016-03-15 12:36:04.417428858 +0100
--- src/version.c   2016-03-15 12:54:49.185678885 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1565,
  /**/

-- 
Never overestimate a man's ability to underestimate a woman.

 /// 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] crash in ga_concat_esc(...) when str is NULL

2016-03-15 Fir de Conversatie Bram Moolenaar

Dominique wrote:

> afl-fuzz (American Fuzzy Lop) found this case
> which causes Vim-7.4.1558 to segfault:
> 
> $ cat crash.vim
> let s:v= {}
> let s:x = {"a": s:v}
> let s:v["b"] = s:x
> let s:w = {"c": s:x,"d": ''}
> call assert_equal(s:w, '')
> 
> $ vim -u NONE -N -S crash.vim
> Vim: Caught deadly signal SEGV
> Press ENTER or type command to continueVim: Finished.
> Segmentation fault (core dumped)
> 
> Valgrind reports:
> 
> ==3644== Memcheck, a memory error detector
> ==3644== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
> ==3644== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
> ==3644== Command: ./vim -u NONE -N -S crash.vim
> ==3644==
> ==3644== Invalid read of size 1
> ==3644==at 0x8083A6F: ga_concat_esc (eval.c:9165)
> ==3644==by 0x8083B37: fill_assert_error (eval.c:9211)
> ==3644==by 0x8083C70: f_assert_equal (eval.c:9247)
> ==3644==by 0x80830C6: call_func (eval.c:8798)
> ==3644==by 0x8082B9A: get_func_tv (eval.c:8597)
> ==3644==by 0x807B6CB: ex_call (eval.c:3526)
> ==3644==by 0x80B78EB: do_one_cmd (ex_docmd.c:2921)
> ==3644==by 0x80B4BF7: do_cmdline (ex_docmd.c:1107)
> ==3644==by 0x80B2B42: do_source (ex_cmds2.c:3727)
> ==3644==by 0x80B223A: cmd_source (ex_cmds2.c:3340)
> ==3644==by 0x80B2198: ex_source (ex_cmds2.c:3315)
> ==3644==by 0x80B78EB: do_one_cmd (ex_docmd.c:2921)
> ==3644==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
> ==3644==
> 
>  9159 static void
>  9160 ga_concat_esc(garray_T *gap, char_u *str)
>  9161 {
>  9162 char_u  *p;
>  9163 char_u  buf[NUMBUFLEN];
>  9164
>  9165 for (p = str; *p != NUL; ++p)
>  9166 switch (*p)
>  9167 {
> 
>  9190 static void
>  9191 fill_assert_error(
>  
>  9211 ga_concat_esc(gap, tv2string(exp_tv, , numbuf, 0));
> 
> ga_concat_esc(...) is called with str being NULL
> (returned value of tv2string at line 9211) which causes
> the segfault at line 9165.
> 
> Attached patch fixes the crash, but I'm not sure
> whether it's the best way to fix it.

Thanks.  I suppose that is the right way to fix it.  But I'll add the
"NULL" to the message, otherwise it doesn't look right.

I'll also add a test for this.

-- 
It was recently discovered that research causes cancer in rats.

 /// 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.


Another -Wshadow warning on src/eval.c

2016-03-15 Fir de Conversatie Kazunobu Kuriyama
Hi,

I got a -Wshadow warning on eval.c:

eval.c: In function 'call_func':
eval.c:8762:14: warning: declaration of 'i' shadows a previous local
[-Wshadow]
  int i;
  ^
eval.c:8689:10: note: shadowed declaration is here
 int  i;
  ^

Note that this is different from the one I reported previously and fixed by
v7.4.1534.

Best regards,
Kazunobu Kuriyama

-- 
-- 
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 7.4.1564

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1564
Problem:An empty list in function() causes an error.
Solution:   Handle an empty list like there is no list of arguments.
Files:  src/eval.c, src/testdir/test_partial.vim


*** ../vim-7.4.1563/src/eval.c  2016-03-14 23:04:49.698923062 +0100
--- src/eval.c  2016-03-15 12:30:04.205184835 +0100
***
*** 11786,11791 
--- 11786,11795 
EMSG2(_("E700: Unknown function: %s"), s);
  else
  {
+   int dict_idx = 0;
+   int arg_idx = 0;
+   list_T  *list = NULL;
+ 
if (STRNCMP(s, "s:", 2) == 0 || STRNCMP(s, "", 5) == 0)
{
charsid_buf[25];
***
*** 11808,11817 
  
if (argvars[1].v_type != VAR_UNKNOWN)
{
-   partial_T   *pt;
-   int dict_idx = 0;
-   int arg_idx = 0;
- 
if (argvars[2].v_type != VAR_UNKNOWN)
{
/* function(name, [args], dict) */
--- 11812,11817 
***
*** 11824,11850 
else
/* function(name, [args]) */
arg_idx = 1;
!   if (dict_idx > 0 && (argvars[dict_idx].v_type != VAR_DICT
!|| argvars[dict_idx].vval.v_dict == NULL))
{
!   EMSG(_("E922: expected a dict"));
!   vim_free(name);
!   return;
}
!   if (arg_idx > 0 && (argvars[arg_idx].v_type != VAR_LIST
!|| argvars[arg_idx].vval.v_list == NULL))
{
!   EMSG(_("E923: Second argument of function() must be a list or a 
dict"));
!   vim_free(name);
!   return;
}
  
-   pt = (partial_T *)alloc_clear(sizeof(partial_T));
if (pt != NULL)
{
if (arg_idx > 0)
{
-   list_T  *list = argvars[arg_idx].vval.v_list;
listitem_T  *li;
int i = 0;
  
--- 11824,11861 
else
/* function(name, [args]) */
arg_idx = 1;
!   if (dict_idx > 0)
{
!   if (argvars[dict_idx].v_type != VAR_DICT)
!   {
!   EMSG(_("E922: expected a dict"));
!   vim_free(name);
!   return;
!   }
!   if (argvars[dict_idx].vval.v_dict == NULL)
!   dict_idx = 0;
}
!   if (arg_idx > 0)
{
!   if (argvars[arg_idx].v_type != VAR_LIST)
!   {
!   EMSG(_("E923: Second argument of function() must be a list 
or a dict"));
!   vim_free(name);
!   return;
!   }
!   list = argvars[arg_idx].vval.v_list;
!   if (list == NULL || list->lv_len == 0)
!   arg_idx = 0;
}
+   }
+   if (dict_idx > 0 || arg_idx > 0)
+   {
+   partial_T   *pt = (partial_T *)alloc_clear(sizeof(partial_T));
  
if (pt != NULL)
{
if (arg_idx > 0)
{
listitem_T  *li;
int i = 0;
  
*** ../vim-7.4.1563/src/testdir/test_partial.vim2016-03-15 
11:05:40.565905732 +0100
--- src/testdir/test_partial.vim2016-03-15 12:34:11.102610386 +0100
***
*** 19,24 
--- 19,27 
call assert_equal("foo/bar/xxx", Cb("xxx"))
call assert_equal("foo/bar/yyy", call(Cb, ["yyy"]))
  
+   let Cb = function('MyFunc', [])
+   call assert_equal("a/b/c", Cb("a", "b", "c"))
+ 
let Sort = function('MySort', [1])
call assert_equal([1, 2, 3], sort([3, 1, 2], Sort))
let Sort = function('MySort', [0])
***
*** 34,43 
let Cb = function('MyDictFunc', ["foo", "bar"], dict)
call assert_equal("hello/foo/bar", Cb())
call assert_fails('Cb("xxx")', 'E492:')
let Cb = function('MyDictFunc', ["foo"], dict)
call assert_equal("hello/foo/xxx", Cb("xxx"))
call assert_fails('Cb()', 'E492:')
let Cb = function('MyDictFunc', dict)
call assert_equal("hello/xxx/yyy", Cb("xxx", "yyy"))
!   call assert_fails('Cb()', 'E492:')
  endfunc
--- 37,52 
let Cb = function('MyDictFunc', ["foo", "bar"], dict)
call assert_equal("hello/foo/bar", Cb())
call assert_fails('Cb("xxx")', 'E492:')
+ 
let Cb = function('MyDictFunc', ["foo"], dict)
call assert_equal("hello/foo/xxx", Cb("xxx"))
call assert_fails('Cb()', 'E492:')
+ 
+   let Cb = function('MyDictFunc', [], dict)
+   call assert_equal("hello/ttt/xxx", Cb("ttt", "xxx"))
+   call assert_fails('Cb("yyy")', 'E492:')
+ 
let Cb = function('MyDictFunc', dict)
call assert_equal("hello/xxx/yyy", Cb("xxx", "yyy"))
!   call assert_fails('Cb("fff")', 'E492:')
  endfunc
*** ../vim-7.4.1563/src/version.c   2016-03-15 11:05:40.569905689 +0100
--- src/version.c   2016-03-15 

Re: Patch 7.4.1553

2016-03-15 Fir de Conversatie Bram Moolenaar

Lce wrote:

> On 13 March 2016, Bram Moolenaar  wrote:
> > 
> > I wrote:
> > 
> > > Patch 7.4.1553
> > > Problem:":runtime" does not use 'packpath'.
> > > Solution:   Add "what" argument.
> > > Files:  src/ex_cmds2.c, src/vim.h, runtime/doc/repeat.txt,
> > > src/testdir/test_packadd.vim
> > 
> > This completes the todo items I had for package support.  Please check
> > out the feature and let us know if something could be improved.  The
> > help can be found with ":help packages".
> 
> The result is _very_ nice, thank you.
> 
> One more issue though: if :packloadall is used to load packages
> early and there is an error in one of the sourced plugins, the entire
> operation seem to be aborted instead of going on with the next plugins.
> As a result, this can break colorscheme again. :)

I suppose we could continue with the next directory.  However, it might
depend on the kind of error.  E.g. if you accidentally run a version of
Vim with some features missing, you probably just want to quit.
One can hit CTRL-C for that.

> Mostly unrelated: the directory structure of plugins should be
> documented explicitly.  Right now there is a de facto standard, and most
> of the relevant bits and pieces are mentioned in the manual, but the
> information is scattered across different sections and files.  It would
> be nice to have it all in a single place, for people that might consider
> writing their first plugin.

I'm open for suggestions.

-- 
Just remember...if the world didn't suck, we'd all fall off.

 /// 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 7.4.1553

2016-03-15 Fir de Conversatie Bram Moolenaar

Ben Haskell wrote:

> > I wrote:
> >
> > > Patch 7.4.1553
> > > Problem:":runtime" does not use 'packpath'.
> > > Solution:   Add "what" argument.
> > > Files:  src/ex_cmds2.c, src/vim.h, runtime/doc/repeat.txt,
> > > src/testdir/test_packadd.vim
> >
> > This completes the todo items I had for package support.
> > Please check out the feature and let us know if something could be
> > improved.  The help can be found with ":help packages".
> 
> 
> Are there any thoughts on bumping the major or minor version numbers?
> Similarly, any thoughts on starting a branch for backwards-incompatible
> features to add in Vim 8+?

Once the new features settle down we'll have 7.5.  But for checking if a
feature exists you should use has().  I just made an incompatible change
in the channel options, that's the kind of thing we don't want once 7.5
is out.

> I haven't been following closely, but the package support and channels
> stuff both seem like huge, recent additions (and surely 1,553 patches could
> be considered a minor change in and of itself).

I hope it's all useful.

-- 
It is hard to understand how a cemetery raised its burial
cost and blamed it on the cost of living.

 /// 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] Docs: function-list does not list all assert_* functions

2016-03-15 Fir de Conversatie Josh Wainwright
Hi,

The list of functions in usr_41.txt does not contain all functions
added for testing. Patch below adds assert_exception() and
assert_fails() (also attached as the tabs seem to be removed):

--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -890,6 +890,8 @@

 Testing:*test-functions*
  assert_equal()   assert that two expressions values are equal
+ assert_exception() assert that a command throws an exception
+ assert_fails() assert that a function call fails
  assert_false() assert that an expression is false
  assert_true() assert that an expression is true


 Regards,

Josh.

-- 
-- 
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.


function-list-assert.patch
Description: Binary data


Re: Patch 7.4.1551

2016-03-15 Fir de Conversatie LCD 47
On 14 March 2016, Bram Moolenaar  wrote:
> 
> Lcd wrote:
> 
> > On 12 March 2016, Bram Moolenaar  wrote:
> > > 
> > > Patch 7.4.1551
> > > Problem:Cannot generate help tags in all doc directories.
> > > Solution:   Make ":helptags ALL" work.
> > > Files:  src/ex_cmds2.c, src/proto/ex_cmds2.pro, src/ex_cmds.c, 
> > > src/vim.h,
> > > src/testdir/test_packadd.vim
> > [...]
> > 
> > I get a segfault running ":helptags ALL":
[...]
>
> Well, don't do that then! :-)
> 
> Looks like a double free...

Fixed by 7.4.1562, thank you!

/lcd

-- 
-- 
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 7.4.1563

2016-03-15 Fir de Conversatie Bram Moolenaar

Patch 7.4.1563
Problem:Partial test fails on windows.
Solution:   Return 1 or -1 from compare function.
Files:  src/testdir/test_partial.vim


*** ../vim-7.4.1562/src/testdir/test_partial.vim2016-03-14 
23:04:49.702923020 +0100
--- src/testdir/test_partial.vim2016-03-15 11:04:17.338771843 +0100
***
*** 9,17 
  return 0
endif
if a:up
! return a:one > a:two
endif
!   return a:one < a:two
  endfunc
  
  func Test_partial_args()
--- 9,17 
  return 0
endif
if a:up
! return a:one > a:two ? 1 : -1
endif
!   return a:one < a:two ? 1 : -1
  endfunc
  
  func Test_partial_args()
*** ../vim-7.4.1562/src/version.c   2016-03-14 23:45:30.897239153 +0100
--- src/version.c   2016-03-15 11:04:58.190346716 +0100
***
*** 745,746 
--- 745,748 
  {   /* Add new patch number below this line */
+ /**/
+ 1563,
  /**/

-- 
I wonder how much deeper the ocean would be without sponges.

 /// 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.