Re: Test failure on 7.4.1759 on OS X

2016-04-22 Fir de Conversatie Yegappan Lakshmanan
Hi,

On Thu, Apr 21, 2016 at 8:34 AM, Manuel Ortega  wrote:
> On Thu, Apr 21, 2016 at 2:57 AM, Bram Moolenaar  wrote:
>>
>> Manuel Ortega wrote:
>>
>> > On OS X 10.11.4, Vim 7.4.1759 after a fresh clone of the git repo, I get
>> > this:
>> >
>> > >From test_alot.vim:
>> > Found errors in Test_strcharpart():
>> > function RunTheTest[9]..Test_strcharpart line 8: Expected '' but got 'a'
>> > function RunTheTest[9]..Test_strcharpart line 9: Expected '' but got 'a'
>> > function RunTheTest[9]..Test_strcharpart line 11: Expected 'a' but got
>> > 'ax'
>> > TEST FAILURE
>>
>> That is very strange.  The test passes on most systems.
>>
>> To reduce the number of possibilities: is this Vim build with multi-byte
>> suport?
>>
>> You can try executing the lines in src/testdir/test_expr.vim manually
>> and see if you can guess what might be wrong.  It must have something to
>> do with the negative start index.
>
>
> I tried again and suddenly the test passes.  I swear on all that is holy
> that when I encounter test failures I try at least three times to reproduce
> them, with a `git clean -fdx` in between.  Perhaps I did something silly,
> though I don't know what that could be.  Either that, or this is a genuinely
> intermittently-failing test.
>
> I'll keep trying to see if I can get it to fail again.  BTW, yes, it's with
> multibyte support.
>

I can reproduce this issue. I built Vim with the clang sanitizer and found
that there is a heap overflow in the f_strcharpart() function in eval.c
in the following line:

   len += mb_char2len(p[nbyte + len]);

When executing this line, nbyte is -1, len is 0 which results in an invalid
access.

I can reproduce this problem, by running the following command:

 echo strcharpart('axb', -1, 1)

- Yegappan

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

2016-04-22 Fir de Conversatie Nikolay Aleksandrovich Pavlov
2016-04-22 22:46 GMT+03:00 Dominique Pellé :
> Bram Moolenaar  wrote:
>>
>> Christian Brabandt wrote:
>>
>>> > On Do, 21 Apr 2016, Bram Moolenaar wrote:
>>> >
>>> > > Patch 7.4.1770
>>> > > Problem:Cannot use true color in the terminal.
>>> > > Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
>>> > > Files:  runtime/doc/options.txt, runtime/doc/term.txt,
>>> >
>>> > > ! Sometimes setting 'guicolors' is not enough and one has to set the 
>>> > > |t_8f| and
>>> > > ! |t_8b| options explicitly. Default values of these options are
>>> > > ! `^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with 
>>> > > real
>>> > > ! escape) respectively, but it is only set when `$TERM` is `xterm`.
>>> >
>>> > That part isn't true, is it?
>>> > I always have to explicitly set t_8f and t_8b according to the
>>> > documentation. But it would be great, if it could work according to the
>>> > documentation.
>>> >
>>> > #v+
>>> > ~/vim/src$ TERM=xterm ./vim -u NONE -N -i NONE --cmd 'set guicolors'
>>> > --cmd ':set term? t_8f? t_8b?' --cmd ':q!'
>>> >   term=xterm  t_8f=  t_8b=
>>> > ~/vim/src$
>>> > #v-
>>>
>>> I think, this patch fixes it:
>>
>> Thanks!  I'll also fix the strange #ifdefs for xterm.
>
>
> Thanks, using vim-7.4.1778, I now have gui colors
> with 256 colors in the terminal, but... only if I use xterm.

Don’t fool yourself, this is placebo. Xterm uses nearest color from
its 8-bit palette, not true color.

>
> If I use xfce4-terminal or gnome-terminal, the terminal
> becomes black and white as soon as I set guicolors.
> Yet gnome-terminal or xfce4-terminal are capable of
> using 256 colors. I could use gui colors with CSApprox
> plugin in those terminals.

On the other hand these terminals are libvte-based, so they must be
able to display true colors. Just you need to update libvte.

See https://gist.github.com/XVilka/8346728 for a list of supported
terminals. According to this first vte version to support true color
is 0.36.

>
> I'll switch to using xterm, but I suppose that many
> people use gnome-terminal or xfce4-terminal and might
> have the same issue.
>
> On the plus side, when using xterm with "set guicolors"
> instead of the CSApprox plugin, Vim startup time is
> is much faster: 122 msec instead of 322 msec.
>
> Regards
> Dominique
>
> --
> --
> 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.


Re: Patch 7.4.1770

2016-04-22 Fir de Conversatie Dominique Pellé
Bram Moolenaar  wrote:
>
> Christian Brabandt wrote:
>
>> > On Do, 21 Apr 2016, Bram Moolenaar wrote:
>> >
>> > > Patch 7.4.1770
>> > > Problem:Cannot use true color in the terminal.
>> > > Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
>> > > Files:  runtime/doc/options.txt, runtime/doc/term.txt,
>> >
>> > > ! Sometimes setting 'guicolors' is not enough and one has to set the 
>> > > |t_8f| and
>> > > ! |t_8b| options explicitly. Default values of these options are
>> > > ! `^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with 
>> > > real
>> > > ! escape) respectively, but it is only set when `$TERM` is `xterm`.
>> >
>> > That part isn't true, is it?
>> > I always have to explicitly set t_8f and t_8b according to the
>> > documentation. But it would be great, if it could work according to the
>> > documentation.
>> >
>> > #v+
>> > ~/vim/src$ TERM=xterm ./vim -u NONE -N -i NONE --cmd 'set guicolors'
>> > --cmd ':set term? t_8f? t_8b?' --cmd ':q!'
>> >   term=xterm  t_8f=  t_8b=
>> > ~/vim/src$
>> > #v-
>>
>> I think, this patch fixes it:
>
> Thanks!  I'll also fix the strange #ifdefs for xterm.


Thanks, using vim-7.4.1778, I now have gui colors
with 256 colors in the terminal, but... only if I use xterm.

If I use xfce4-terminal or gnome-terminal, the terminal
becomes black and white as soon as I set guicolors.
Yet gnome-terminal or xfce4-terminal are capable of
using 256 colors. I could use gui colors with CSApprox
plugin in those terminals.

I'll switch to using xterm, but I suppose that many
people use gnome-terminal or xfce4-terminal and might
have the same issue.

On the plus side, when using xterm with "set guicolors"
instead of the CSApprox plugin, Vim startup time is
is much faster: 122 msec instead of 322 msec.

Regards
Dominique

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

2016-04-22 Fir de Conversatie Christian Brabandt
On Do, 21 Apr 2016, Bram Moolenaar wrote:

> 
> Patch 7.4.1770
> Problem:Cannot use true color in the terminal.
> Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> runtime/doc/various.txt, src/auto/configure, src/config.h.in,
> src/configure.in, src/eval.c, src/globals.h, src/hardcopy.c,
> src/option.c, src/option.h, src/proto/term.pro, src/screen.c,
> src/structs.h, src/syntax.c, src/term.c, src/term.h,
> src/version.c, src/vim.h

another small change

When synIDattr(..., 'fg') or
synIDattr(..., 'bg') is used, the terminal colors are returned, even if
'guicolors' is set. This patch fixes it:

diff --git a/src/eval.c b/src/eval.c
index 146348d..16d0e47 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -20014,8 +20014,8 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
 }
 else
 {
-#ifdef FEAT_GUI
-   if (gui.in_use)
+#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+   if (USE_24BIT)
modec = 'g';
else
 #endif


Best,
Christian
-- 
Ich will nichts mit den Nieren wagen
solang' daran die Viren nagen.

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1778
Problem:When using the term truecolor feature, the t_8f and t_8b termcap
options are not set by default.
Solution:   Move the values to before BT_EXTRA_KEYS. (Christian Brabandt)
Files:  src/term.c


*** ../vim-7.4.1777/src/term.c  2016-04-22 20:20:13.004866307 +0200
--- src/term.c  2016-04-22 21:08:43.746311313 +0200
***
*** 793,802 
  #  endif
  # endif
  
- # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || 
defined(SOME_BUILTIN_TCAPS) || defined(__EMX__) || defined(FEAT_TERMTRUECOLOR)
- {(int)KS_NAME,"xterm"},
- # endif
  # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || 
defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
  {(int)KS_CE,  IF_EB("\033[K", ESC_STR "[K")},
  {(int)KS_AL,  IF_EB("\033[L", ESC_STR "[L")},
  #  ifdef TERMINFO
--- 793,800 
  #  endif
  # endif
  
  # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || 
defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
+ {(int)KS_NAME,"xterm"},
  {(int)KS_CE,  IF_EB("\033[K", ESC_STR "[K")},
  {(int)KS_AL,  IF_EB("\033[L", ESC_STR "[L")},
  #  ifdef TERMINFO
***
*** 861,866 
--- 859,869 
  {(int)KS_CRV, IF_EB("\033[>c", ESC_STR "[>c")},
  {(int)KS_RBG, IF_EB("\033]11;?\007", ESC_STR "]11;?\007")},
  {(int)KS_U7,  IF_EB("\033[6n", ESC_STR "[6n")},
+ #  ifdef FEAT_TERMTRUECOLOR
+ /* These are printf strings, not terminal codes. */
+ {(int)KS_8F,  IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR 
"[38;2;%lu;%lu;%lum")},
+ {(int)KS_8B,  IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR 
"[48;2;%lu;%lu;%lum")},
+ #  endif
  
  {K_UP,IF_EB("\033O*A", ESC_STR "O*A")},
  {K_DOWN,  IF_EB("\033O*B", ESC_STR "O*B")},
***
*** 944,953 
  {TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, /* F36 */
  {TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, /* F37 */
  # endif
- # ifdef FEAT_TERMTRUECOLOR
- {(int)KS_8F,  IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR 
"[38;2;%lu;%lu;%lum")},
- {(int)KS_8B,  IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR 
"[48;2;%lu;%lu;%lum")},
- # endif
  
  # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
  /*
--- 947,952 
*** ../vim-7.4.1777/src/version.c   2016-04-22 20:46:42.988145173 +0200
--- src/version.c   2016-04-22 21:10:23.893262761 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1778,
  /**/

-- 
With sufficient thrust, pigs fly just fine.
   -- RFC 1925

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Christian Brabandt wrote:

> > On Do, 21 Apr 2016, Bram Moolenaar wrote:
> > 
> > > Patch 7.4.1770
> > > Problem:Cannot use true color in the terminal.
> > > Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> > > Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> > 
> > > ! Sometimes setting 'guicolors' is not enough and one has to set the 
> > > |t_8f| and
> > > ! |t_8b| options explicitly. Default values of these options are
> > > ! `^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with 
> > > real
> > > ! escape) respectively, but it is only set when `$TERM` is `xterm`.
> > 
> > That part isn't true, is it?
> > I always have to explicitly set t_8f and t_8b according to the 
> > documentation. But it would be great, if it could work according to the 
> > documentation.
> > 
> > #v+
> > ~/vim/src$ TERM=xterm ./vim -u NONE -N -i NONE --cmd 'set guicolors' 
> > --cmd ':set term? t_8f? t_8b?' --cmd ':q!'
> >   term=xterm  t_8f=  t_8b=
> > ~/vim/src$
> > #v-
> 
> I think, this patch fixes it:

Thanks!  I'll also fix the strange #ifdefs for xterm.

-- 
"Hegel was right when he said that we learn from history that man can
never learn anything from history."   (George Bernard Shaw)

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

2016-04-22 Fir de Conversatie Christian Brabandt
On Fr, 22 Apr 2016, Christian Brabandt wrote:

> Hi Bram!
> 
> On Do, 21 Apr 2016, Bram Moolenaar wrote:
> 
> > Patch 7.4.1770
> > Problem:Cannot use true color in the terminal.
> > Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> > Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> 
> > ! Sometimes setting 'guicolors' is not enough and one has to set the |t_8f| 
> > and
> > ! |t_8b| options explicitly. Default values of these options are
> > ! `^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with real
> > ! escape) respectively, but it is only set when `$TERM` is `xterm`.
> 
> That part isn't true, is it?
> I always have to explicitly set t_8f and t_8b according to the 
> documentation. But it would be great, if it could work according to the 
> documentation.
> 
> #v+
> ~/vim/src$ TERM=xterm ./vim -u NONE -N -i NONE --cmd 'set guicolors' 
> --cmd ':set term? t_8f? t_8b?' --cmd ':q!'
>   term=xterm  t_8f=  t_8b=
> ~/vim/src$
> #v-

I think, this patch fixes it:

diff --git a/src/term.c b/src/term.c
index 059aed7..06a7d76 100644
--- a/src/term.c
+++ b/src/term.c
@@ -913,6 +913,10 @@ static struct builtin_term builtin_termcaps[] =
 {K_KENTER, IF_EB("\033O*M", ESC_STR "O*M")},   /* keypad Enter 
*/
 {K_KPOINT, IF_EB("\033O*n", ESC_STR "O*n")},   /* keypad . */
 {K_KDEL,   IF_EB("\033[3;*~", ESC_STR "[3;*~")},   /* keypad Del */
+# ifdef FEAT_TERMTRUECOLOR
+{(int)KS_8F,   IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR 
"[38;2;%lu;%lu;%lum")},
+{(int)KS_8B,   IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR 
"[48;2;%lu;%lu;%lum")},
+# endif

 {BT_EXTRA_KEYS,   ""},
 {TERMCAP2KEY('k', '0'), IF_EB("\033[10;*~", ESC_STR "[10;*~")}, /* F0 */
@@ -944,10 +948,6 @@ static struct builtin_term builtin_termcaps[] =
 {TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, /* F36 */
 {TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, /* F37 */
 # endif
-# ifdef FEAT_TERMTRUECOLOR
-{(int)KS_8F,   IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR 
"[38;2;%lu;%lu;%lum")},
-{(int)KS_8B,   IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR 
"[48;2;%lu;%lu;%lum")},
-# endif

 # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
 /*


Mit freundlichen Grüßen
Christian
-- 
Aus Fehlern lernt man.  Politiker machen keine Fehler.

-- 
-- 
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: [security issue] job_start/ch_open/timer_start is enabled on restricted/secure mode

2016-04-22 Fir de Conversatie Bram Moolenaar

Thinca wrote:
> 
> Thank you for the patch (I'm reporter of this).
> I think check_restricted() is unnecessary for timer.
> But I follow Bram's judge :)

It should be disallowed in the sandbox, since the callback would be
invoked outside of the sandbox.

-- 
ARTHUR:  Shut up!  Will you shut up!
DENNIS:  Ah, now we see the violence inherent in the system.
ARTHUR:  Shut up!
DENNIS:  Oh!  Come and see the violence inherent in the system!
 HELP! HELP!  I'm being repressed!
  The Quest for the Holy Grail (Monty Python)

 /// 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: [security issue] job_start/ch_open/timer_start is enabled on restricted/secure mode

2016-04-22 Fir de Conversatie Bram Moolenaar

Yasuhiro Matsumoto wrote:

> index 3542b77..0045967 100644
> --- a/src/eval.c
> +++ b/src/eval.c

Thanks!

As mentioned, for the timer check_restricted() isn't needed, this is not
a shell command.


-- 
Seen on the back of a biker's vest: If you can read this, my wife fell 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.1777

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1777
Problem:Newly added features can escape the sandbox.
Solution:   Add checks for restricted and secure. (Yasuhiro Matsumoto)
Files:  src/eval.c


*** ../vim-7.4.1776/src/eval.c  2016-04-22 10:00:31.888192784 +0200
--- src/eval.c  2016-04-22 20:39:16.676839294 +0200
***
*** 10408,10413 
--- 10408,10415 
  f_ch_open(typval_T *argvars, typval_T *rettv)
  {
  rettv->v_type = VAR_CHANNEL;
+ if (check_restricted() || check_secure())
+   return;
  rettv->vval.v_channel = channel_open_func(argvars);
  }
  
***
*** 15078,15083 
--- 15080,15087 
  f_job_start(typval_T *argvars, typval_T *rettv)
  {
  rettv->v_type = VAR_JOB;
+ if (check_restricted() || check_secure())
+   return;
  rettv->vval.v_job = job_start(argvars);
  }
  
***
*** 16821,16828 
  #endif
  
  #ifdef FEAT_CLIENTSERVER
- static void remote_common(typval_T *argvars, typval_T *rettv, int expr);
- 
  static void
  remote_common(typval_T *argvars, typval_T *rettv, int expr)
  {
--- 16825,16830 
***
*** 20683,20688 
--- 20685,20692 
  char_u  *callback;
  dict_T  *dict;
  
+ if (check_secure())
+   return;
  if (argvars[2].v_type != VAR_UNKNOWN)
  {
if (argvars[2].v_type != VAR_DICT
*** ../vim-7.4.1776/src/version.c   2016-04-22 20:20:13.004866307 +0200
--- src/version.c   2016-04-22 20:36:44.914435404 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1777,
  /**/

-- 
ARTHUR:  Bloody peasant!
DENNIS:  Oh, what a give away.  Did you hear that, did you hear that, eh?
 That's what I'm on about -- did you see him repressing me, you saw it
 didn't you?
  The Quest for the Holy Grail (Monty Python)

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

2016-04-22 Fir de Conversatie Christian Brabandt
Hi Bram!

On Do, 21 Apr 2016, Bram Moolenaar wrote:

> Patch 7.4.1770
> Problem:Cannot use true color in the terminal.
> Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> Files:  runtime/doc/options.txt, runtime/doc/term.txt,

> ! Sometimes setting 'guicolors' is not enough and one has to set the |t_8f| 
> and
> ! |t_8b| options explicitly. Default values of these options are
> ! `^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with real
> ! escape) respectively, but it is only set when `$TERM` is `xterm`.

That part isn't true, is it?
I always have to explicitly set t_8f and t_8b according to the 
documentation. But it would be great, if it could work according to the 
documentation.

#v+
~/vim/src$ TERM=xterm ./vim -u NONE -N -i NONE --cmd 'set guicolors' 
--cmd ':set term? t_8f? t_8b?' --cmd ':q!'
  term=xterm  t_8f=  t_8b=
~/vim/src$
#v-

Best,
Christian
-- 
Lieber an der Spitze stehen, als auf die Spitze treiben.

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Kazunobu Kuriyama wrote:

> Looks the guicolors feature has stopped working since this patch.
> 
> The cause is a wrong buffer size.
> 
> The attached patch fixes the problem.

Thanks.  Autocompletion was wrong (wasn't my fault! :-).


-- 
Windows
M!uqoms

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1776
Problem:Using wrong buffer length.
Solution:   use the right name. (Kazunobu Kuriyama)
Files:  src/term.c


*** ../vim-7.4.1775/src/term.c  2016-04-22 11:48:58.117414653 +0200
--- src/term.c  2016-04-22 20:16:52.566986715 +0200
***
*** 2804,2810 
  #define MAX_COLOR_STR_LEN 100
  char  buf[MAX_COLOR_STR_LEN];
  
! vim_snprintf(buf, MAX_KEY_CODE_LEN,
  (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
  OUT_STR(buf);
  }
--- 2804,2810 
  #define MAX_COLOR_STR_LEN 100
  char  buf[MAX_COLOR_STR_LEN];
  
! vim_snprintf(buf, MAX_COLOR_STR_LEN,
  (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
  OUT_STR(buf);
  }
*** ../vim-7.4.1775/src/version.c   2016-04-22 12:24:44.559573688 +0200
--- src/version.c   2016-04-22 20:18:23.738015238 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1776,
  /**/

-- 
ARTHUR:  Be quiet!
DENNIS:  Well you can't expect to wield supreme executive power just 'cause
 some watery tart threw a sword at you!
ARTHUR:  Shut up!
DENNIS:  I mean, if I went around sayin' I was an empereror just because some
 moistened bint had lobbed a scimitar at me they'd put me away!
  The Quest for the Holy Grail (Monty Python)

 /// 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: 7.4.177X broke termtruecolor

2016-04-22 Fir de Conversatie Christian Brabandt

On Fr, 22 Apr 2016, Manuel Ortega wrote:

> On OS X 10.11.4, one of the recent patches that was intended to fix the 
> new
> truecolor terminal support broke things badly.
> 
> It is now the case that "set guicolors", where the relevant "t_b8" stuff
> was already set in my vimrc, causing the OS X print dialog to appear, and
> the vim screen is garbled, and is also black and white.
> 
> These settings worked previously.

Yes, a patch has been posted but not included yet:
https://groups.google.com/d/msg/vim_dev/RHkxqpnsM1A/9ykPdwN9AQAJ

Best,
Christian
-- 
Wenn Microsoft Autos bauen würde ...
würden die Autos jedes Jahr größer, langsamer und wären unfallgefährdeter.

-- 
-- 
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: 7.4.177X broke termtruecolor

2016-04-22 Fir de Conversatie Manuel Ortega
On Fri, Apr 22, 2016 at 9:09 AM, Manuel Ortega 
wrote:

> On OS X 10.11.4, one of the recent patches that was intended to fix the
> new truecolor terminal support broke things badly.
>
> It is now the case that "set guicolors", where the relevant "t_b8" stuff
> was already set in my vimrc, causing the OS X print dialog to appear, and
> the vim screen is garbled, and is also black and white.
>
> These settings worked previously.
>

Bisecting reveals that patch 7.4.1773 is the culprit.  If it helps, this
patch also introduced a *new* compiler warning that wasn't there previously:

gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1   -o objects/term.o term.c
term.c:1388:14: warning: incompatible pointer to integer conversion
assigning to
  'int' from 'char *' [-Wint-conversion]
ignored = fgets(line, LINE_LEN, fd);
^ ~

-- 
-- 
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/vim] Highlighting matching parenthese doesn't work after scrolling viewport (#776)

2016-04-22 Fir de Conversatie toothpik
On Fri, Apr 22, 2016 at 06:51:30AM -0700, W. wrote:
> Steps to reproduce:

> 1. open any file for which vim highlights matching parenthesis

this sounds suspiciously like behavior provided by a plugin -- if, after
you have opened this "any file for which vim highlights matching parens"
you perform a

:scriptnames

and report back here the list it provides (:redir @+ might be of use
here) -- do that and we will probably then tell you to contact the
plugin author, mentioned at the beginning of whatever plugin in the list
looks to be the highlighting miscreant

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


7.4.177X broke termtruecolor

2016-04-22 Fir de Conversatie Manuel Ortega
On OS X 10.11.4, one of the recent patches that was intended to fix the new
truecolor terminal support broke things badly.

It is now the case that "set guicolors", where the relevant "t_b8" stuff
was already set in my vimrc, causing the OS X print dialog to appear, and
the vim screen is garbled, and is also black and white.

These settings worked previously.

-Manny

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


[bug] Syntax file for markdown uses semi-absolute path

2016-04-22 Fir de Conversatie Axel Bender
Opening a markdown file while having an own syntax file for HTML in another 
directory (but accessible via ("runtime") gives me some errors.

This is due to using "runtime! syntax/html.vim" command in markdown.vim (line 
15).
Changing this to "runtime! html.vim" fixes this.

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

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


Re: Patch 7.4.17

2016-04-22 Fir de Conversatie Kazunobu Kuriyama
Looks the guicolors feature has stopped working since this patch.

The cause is a wrong buffer size.

The attached patch fixes the problem.

Best regards,
Kazunobu Kuriyama

2016-04-22 18:26 GMT+09:00 Bram Moolenaar :

>
> Patch 7.4.1773 (after 7.4.1770)
> Problem:Compiler warnings. (Dominique Pelle)
> Solution:   Add UNUSED. Add type cast. Avoid a buffer overflow.
> Files:  src/syntax.c, src/term.c
>
>
> *** ../vim-7.4.1772/src/syntax.c2016-04-21 21:08:11.793948968 +0200
> --- src/syntax.c2016-04-22 11:05:26.776199811 +0200
> ***
> *** 9545,9552 
>   static void
>   gui_do_one_color(
>   int   idx,
> ! int   do_menu,/* TRUE: might set the menu font */
> ! int   do_tooltip) /* TRUE: might set the tooltip
> font */
>   {
>   int   didit = FALSE;
>
> --- 9545,9552 
>   static void
>   gui_do_one_color(
>   int   idx,
> ! int   do_menu UNUSED,/* TRUE: might set the menu
> font */
> ! int   do_tooltip UNUSED) /* TRUE: might set the tooltip
> font */
>   {
>   int   didit = FALSE;
>
> *** ../vim-7.4.1772/src/term.c  2016-04-21 21:08:11.797948928 +0200
> --- src/term.c  2016-04-22 11:21:23.102459378 +0200
> ***
> *** 1272,1277 
> --- 1272,1278 
>   char_u*color_name;
>   guicolor_T color;
>   };
> +
>   static struct rgbcolor_table_S rgb_table[] = {
> {(char_u *)"black", RGB(0x00, 0x00, 0x00)},
> {(char_u *)"blue",  RGB(0x00, 0x00, 0xD4)},
> ***
> *** 1354,1360 
>   else
>   {
> /* Check if the name is one of the colors we know */
> !   for (i = 0; i < sizeof(rgb_table) / sizeof(rgb_table[0]); i++)
> if (STRICMP(name, rgb_table[i].color_name) == 0)
> return rgb_table[i].color;
>   }
> --- 1355,1361 
>   else
>   {
> /* Check if the name is one of the colors we know */
> !   for (i = 0; i < (int)(sizeof(rgb_table) / sizeof(rgb_table[0]));
> i++)
> if (STRICMP(name, rgb_table[i].color_name) == 0)
> return rgb_table[i].color;
>   }
> ***
> *** 1384,1390 
> int pos;
> char*color;
>
> !   fgets(line, LINE_LEN, fd);
> len = strlen(line);
>
> if (len <= 1 || line[len-1] != '\n')
> --- 1385,1391 
> int pos;
> char*color;
>
> !   ignored = fgets(line, LINE_LEN, fd);
> len = strlen(line);
>
> if (len <= 1 || line[len-1] != '\n')
> ***
> *** 2803,2811 
>   static void
>   term_rgb_color(char_u *s, long_u rgb)
>   {
> ! char  buf[7+3*3+2+1+1];
>
> ! sprintf(buf, (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
>   OUT_STR(buf);
>   }
>   #endif
> --- 2804,2814 
>   static void
>   term_rgb_color(char_u *s, long_u rgb)
>   {
> ! #define MAX_COLOR_STR_LEN 100
> ! char  buf[MAX_COLOR_STR_LEN];
>
> ! vim_snprintf(buf, MAX_KEY_CODE_LEN,
> ! (char *)s, RED(rgb), GREEN(rgb),
> BLUE(rgb));
>   OUT_STR(buf);
>   }
>   #endif
> *** ../vim-7.4.1772/src/version.c   2016-04-22 10:14:01.003848576 +0200
> --- src/version.c   2016-04-22 11:22:18.497894688 +0200
> ***
> *** 755,756 
> --- 755,758 
>   {   /* Add new patch number below this line */
> + /**/
> + 1773,
>   /**/
>
> --
> A poem:read aloud:
>
> <> !*''#   Waka waka bang splat tick tick hash,
> ^"`$$- Caret quote back-tick dollar dollar dash,
> !*=@$_ Bang splat equal at dollar under-score,
> %*<> ~#4   Percent splat waka waka tilde number four,
> &[]../ Ampersand bracket bracket dot dot slash,
> |{,,SYSTEM HALTED  Vertical-bar curly-bracket comma comma CRASH.
>
> Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand Rapids,
> MI.)
>
>  /// 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.
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply belo

Re: Patch 7.4.1770

2016-04-22 Fir de Conversatie Bram Moolenaar

Christian Brabandt wrote;

> > Dominique Pelle wrote:
> > > I just tried it on xubuntu-14.04.4 (xfce4-terminal, TERM=xterm-256color)
> > > but it does not work yet for me and there are compilation warnings:
> > 
> > I can fix the obvious problems, but it appears some part of the patch
> > went missing.  I had to merge manually.
> 
> I see you just fixed the obvious warnings. However there still exists a 
> problem.
> 
> If you enable guicolors, you should have the rgb.txt file in your 
> $VIMRUNTIME directory,  since vim tries to open that file and parse the 
> color names from there (termtrue_mch_get_color()). This fails if the 
> file is not available. Unfortunately, the unix make install part, does 
> not install it and when executing e.g. the following command:
> highlight MatchParen term=reverse ctermbg=7 guibg=cornsilk
> Vim errors with
> E254: Cannot allocate color cornsilk
> 
> perhaps this patch fixes it:

Thanks.  Once we have it working we should probably include the feature
for the huge build.

-- 
I'm sure that I asked CBuilder to do a "full" install.  Looks like I got
a "fool" install, instead.  Charles E Campbell, Jr, PhD


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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1775
Problem:The rgb.txt file is not installed.
Solution:   Install the file. (Christian Brabandt)
Files:  src/Makefile


*** ../vim-7.4.1774/src/Makefile2016-04-22 10:14:00.999848618 +0200
--- src/Makefile2016-04-22 12:21:38.737498569 +0200
***
*** 1076,1081 
--- 1076,1084 
  ### Name of the bugreport file target.
  SYS_BUGR_FILE = $(DESTDIR)$(SCRIPTLOC)/bugreport.vim
  
+ ### Name of the rgb.txt file target.
+ SYS_RGB_FILE   = $(DESTDIR)$(SCRIPTLOC)/rgb.txt
+ 
  ### Name of the file type detection file target.
  SYS_FILETYPE_FILE = $(DESTDIR)$(SCRIPTLOC)/filetype.vim
  
***
*** 2167,2172 
--- 2170,2178 
chmod $(VIMSCRIPTMOD) $(MSWIN_FILE)
$(INSTALL_DATA) $(SCRIPTSOURCE)/evim.vim $(EVIM_FILE)
chmod $(VIMSCRIPTMOD) $(EVIM_FILE)
+ # install the rgb.txt file
+   $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(SYS_RGB_FILE)
+   chmod $(VIMSCRIPTMOD) $(SYS_RGB_FILE)
  # install the bugreport file
$(INSTALL_DATA) $(SCRIPTSOURCE)/bugreport.vim $(SYS_BUGR_FILE)
chmod $(VIMSCRIPTMOD) $(SYS_BUGR_FILE)
*** ../vim-7.4.1774/src/version.c   2016-04-22 11:48:58.117414653 +0200
--- src/version.c   2016-04-22 12:23:23.616412144 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1775,
  /**/

-- 
Q: How does a UNIX Guru pick up a girl?
A: look; grep; which; eval; nice; uname; talk; date;

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1774 (after 7.4.1770)
Problem:Cterm true color feature has warnings.
Solution:   Add type casts.
Files:  src/screen.c, src/syntax.c, src/term.c


*** ../vim-7.4.1773/src/screen.c2016-04-21 21:08:11.793948968 +0200
--- src/screen.c2016-04-22 11:47:10.778524303 +0200
***
*** 7842,7848 
else if (aep != NULL && cterm_normal_fg_bold &&
  #ifdef FEAT_TERMTRUECOLOR
(p_guicolors ?
!   (aep->ae_u.cterm.fg_rgb != INVALCOLOR):
  #endif
(t_colors > 1 && aep->ae_u.cterm.fg_color)
  #ifdef FEAT_TERMTRUECOLOR
--- 7842,7848 
else if (aep != NULL && cterm_normal_fg_bold &&
  #ifdef FEAT_TERMTRUECOLOR
(p_guicolors ?
!   (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR):
  #endif
(t_colors > 1 && aep->ae_u.cterm.fg_color)
  #ifdef FEAT_TERMTRUECOLOR
***
*** 7871,7879 
  #ifdef FEAT_TERMTRUECOLOR
if (p_guicolors)
{
!   if (aep->ae_u.cterm.fg_rgb != INVALCOLOR)
term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
!   if (aep->ae_u.cterm.bg_rgb != INVALCOLOR)
term_bg_rgb_color(aep->ae_u.cterm.bg_rgb);
}
else
--- 7871,7879 
  #ifdef FEAT_TERMTRUECOLOR
if (p_guicolors)
{
!   if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
!   if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR)
term_bg_rgb_color(aep->ae_u.cterm.bg_rgb);
}
else
***
*** 7933,7940 
if (aep != NULL &&
  #ifdef FEAT_TERMTRUECOLOR
(p_guicolors ?
!   (aep->ae_u.cterm.fg_rgb != INVALCOLOR ||
!aep->ae_u.cterm.bg_rgb != INVALCOLOR):
  #endif
(aep->ae_u.cterm.fg_color || 
aep->ae_u.cterm.bg_color)
  #ifdef FEAT_TERMTRUECOLOR
--- 7933,7940 
if (aep != NULL &&
  #ifdef FEAT_TERMTRUECOLOR
(p_guicolors ?
!   (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR ||
!aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR):
  #endif
(aep->ae_u.cterm.fg_color || 
aep->ae_u.cterm.bg_color)
  #ifdef FEAT_TERMTRUECOLOR
***
*** 7991,7999 
  #ifdef FEAT_TERMTRUECOLOR
if (p_guicolors)
{
!   if (cterm_normal_fg_gui_color != INVALCOLOR)
term_fg_rgb_color(cterm_normal_fg_gui_color);
!   if (cterm_normal_bg_gui_color != INVALCOLOR)
term_bg_rgb_color(cterm_normal_bg_gui_color);
}
else
--- 7991,7999 
  #ifdef FEAT_TERMTRUECOLOR
if (p_guicolors)
{
!   if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
term_fg_rgb_color(cterm_normal_fg_gui_color);
!   if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
term_bg_rgb_color(cterm_normal_bg_gui_color);
}
else
***
*** 8027,8034 
/* set Normal cterm colors */
  #ifdef FEAT_TERMTRUECOLOR
if (p_guicolors ?
!   (cterm_normal_fg_gui_color != INVALCOLOR
!|| cterm_normal_bg_gui_color != INVALCOLOR):
(cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
  #else
if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)
--- 8027,8034 
/* set Normal cterm colors */
  #ifdef FEAT_TERMTRUECOLOR
if (p_guicolors ?
!   (cterm_normal_fg_gui_color != (long_u)INVALCOLOR
!|| cterm_normal_bg_gui_color != (long_u)INVALCOLOR):
(cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
  #else
if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)
***
*** 8960,8966 
|| gui.in_use
  #endif
  #ifdef FEAT_TERMTRUECOLOR
!   || (p_guicolors && cterm_normal_bg_gui_color != INVALCOLOR)
  #endif
|| cterm_normal_bg_color == 0 || *T_UT != NUL));
  }
--- 8960,8966 
|| gui.in_use
  #endif
  #ifdef FEAT_TERMTRUECOLOR
!   || (p_guicolors && cterm_normal_bg_gui_color != 
(long_u)INVALCOLOR)
  #endif
|| cterm_normal_bg_color == 0 || *T_UT != NUL));
  }
*** ../vim-7.4.1773/src/syntax.c2016-04-22 11:24:36.524487481 +0200
--- src/syntax.c2016-04-22 11:47:17.874450920 +0200
***
*** 8788,8796 
if (spell_aep->ae_u.cterm.bg_color > 0)
new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.b

Re: Patch 7.4.1770

2016-04-22 Fir de Conversatie Christian Brabandt
Hi Bram!

On Fr, 22 Apr 2016, Bram Moolenaar wrote:

> 
> Dominique Pelle wrote:
> 
> > Nikolay Aleksandrovich Pavlov  wrote:
> > 
> > > 2016-04-21 22:39 GMT+03:00 Kent Sibilev :
> > >> On Thursday, April 21, 2016 at 3:11:42 PM UTC-4, Bram Moolenaar wrote:
> > >>> Patch 7.4.1770
> > >>> Problem:Cannot use true color in the terminal.
> > >>> Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> > >>> Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> > >>> runtime/doc/various.txt, src/auto/configure, 
> > >>> src/config.h.in,
> > >>> src/configure.in, src/eval.c, src/globals.h, src/hardcopy.c,
> > >>> src/option.c, src/option.h, src/proto/term.pro, 
> > >>> src/screen.c,
> > >>> src/structs.h, src/syntax.c, src/term.c, src/term.h,
> > >>> src/version.c, src/vim.h
> > >>>
> > >>
> > >> That's great, but how do I set it?
> > >>
> > >> :set guicolors?
> > >> E519: Option not supported: guicolors?
> > >> :echo &guicolors
> > >> 0
> > >> :set guicolors
> > >> :echo &guicolors
> > >> 0
> > >>
> > >> Also now when running 'make install'  I get the following error at the 
> > >> end:
> > >>
> > >> if test -d /usr/local/share/applications -a -w 
> > >> /usr/local/share/applications; then \
> > >>cp ../runtime/vim.desktop \
> > >> ../runtime/gvim.desktop \
> > >> /usr/local/share/applications; \
> > >>if test -z "" -a -x ; then \
> > >>-q /usr/local/share/applications; \
> > >>fi \
> > >> fi
> > >> /bin/sh: line 0: test: argument expected
> > >
> > > To get &guicolors you should use --enable-termtruecolor at configure
> > > stage. Not sure why you get that error at `make install`, AFAIR I did
> > > not edit anything that should affect installation process.
> > 
> > Hi Nikolay
> > 
> > I just tried it on xubuntu-14.04.4 (xfce4-terminal, TERM=xterm-256color)
> > but it does not work yet for me and there are compilation warnings:
> 
> I can fix the obvious problems, but it appears some part of the patch
> went missing.  I had to merge manually.

I see you just fixed the obvious warnings. However there still exists a 
problem.

If you enable guicolors, you should have the rgb.txt file in your 
$VIMRUNTIME directory,  since vim tries to open that file and parse the 
color names from there (termtrue_mch_get_color()). This fails if the 
file is not available. Unfortunately, the unix make install part, does 
not install it and when executing e.g. the following command:
highlight MatchParen term=reverse ctermbg=7 guibg=cornsilk
Vim errors with
E254: Cannot allocate color cornsilk

perhaps this patch fixes it:
diff --git a/src/Makefile b/src/Makefile
index 716dae7..152e69e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1076,6 +1076,9 @@ SYS_DELMENU_FILE = $(DESTDIR)$(SCRIPTLOC)/delmenu.vim
 ### Name of the bugreport file target.
 SYS_BUGR_FILE  = $(DESTDIR)$(SCRIPTLOC)/bugreport.vim

+### Name of the rgb.txt file target.
+SYS_RGB_FILE   = $(DESTDIR)$(SCRIPTLOC)/rgb.txt
+
 ### Name of the file type detection file target.
 SYS_FILETYPE_FILE = $(DESTDIR)$(SCRIPTLOC)/filetype.vim

@@ -2170,6 +2173,9 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) 
\
 # install the bugreport file
$(INSTALL_DATA) $(SCRIPTSOURCE)/bugreport.vim $(SYS_BUGR_FILE)
chmod $(VIMSCRIPTMOD) $(SYS_BUGR_FILE)
+# install the rgb.txt file
+   $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(SYS_RGB_FILE)
+   chmod $(VIMSCRIPTMOD) $(SYS_RGB_FILE)
 # install the example vimrc files
$(INSTALL_DATA) $(SCRIPTSOURCE)/vimrc_example.vim $(DEST_SCRIPT)
chmod $(VIMSCRIPTMOD) $(DEST_SCRIPT)/vimrc_example.vim


Best,
Christian
-- 
Den Ahnungslosen schenkt der Herr einen leichten Schlaf.
-- Gaius Julius Caesar

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1773 (after 7.4.1770)
Problem:Compiler warnings. (Dominique Pelle)
Solution:   Add UNUSED. Add type cast. Avoid a buffer overflow.
Files:  src/syntax.c, src/term.c


*** ../vim-7.4.1772/src/syntax.c2016-04-21 21:08:11.793948968 +0200
--- src/syntax.c2016-04-22 11:05:26.776199811 +0200
***
*** 9545,9552 
  static void
  gui_do_one_color(
  int   idx,
! int   do_menu,/* TRUE: might set the menu font */
! int   do_tooltip) /* TRUE: might set the tooltip font */
  {
  int   didit = FALSE;
  
--- 9545,9552 
  static void
  gui_do_one_color(
  int   idx,
! int   do_menu UNUSED,/* TRUE: might set the menu font */
! int   do_tooltip UNUSED) /* TRUE: might set the tooltip font 
*/
  {
  int   didit = FALSE;
  
*** ../vim-7.4.1772/src/term.c  2016-04-21 21:08:11.797948928 +0200
--- src/term.c  2016-04-22 11:21:23.102459378 +0200
***
*** 1272,1277 
--- 1272,1278 
  char_u*color_name;
  guicolor_T color;
  };
+ 
  static struct rgbcolor_table_S rgb_table[] = {
{(char_u *)"black", RGB(0x00, 0x00, 0x00)},
{(char_u *)"blue",  RGB(0x00, 0x00, 0xD4)},
***
*** 1354,1360 
  else
  {
/* Check if the name is one of the colors we know */
!   for (i = 0; i < sizeof(rgb_table) / sizeof(rgb_table[0]); i++)
if (STRICMP(name, rgb_table[i].color_name) == 0)
return rgb_table[i].color;
  }
--- 1355,1361 
  else
  {
/* Check if the name is one of the colors we know */
!   for (i = 0; i < (int)(sizeof(rgb_table) / sizeof(rgb_table[0])); i++)
if (STRICMP(name, rgb_table[i].color_name) == 0)
return rgb_table[i].color;
  }
***
*** 1384,1390 
int pos;
char*color;
  
!   fgets(line, LINE_LEN, fd);
len = strlen(line);
  
if (len <= 1 || line[len-1] != '\n')
--- 1385,1391 
int pos;
char*color;
  
!   ignored = fgets(line, LINE_LEN, fd);
len = strlen(line);
  
if (len <= 1 || line[len-1] != '\n')
***
*** 2803,2811 
  static void
  term_rgb_color(char_u *s, long_u rgb)
  {
! char  buf[7+3*3+2+1+1];
  
! sprintf(buf, (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
  OUT_STR(buf);
  }
  #endif
--- 2804,2814 
  static void
  term_rgb_color(char_u *s, long_u rgb)
  {
! #define MAX_COLOR_STR_LEN 100
! char  buf[MAX_COLOR_STR_LEN];
  
! vim_snprintf(buf, MAX_KEY_CODE_LEN,
! (char *)s, RED(rgb), GREEN(rgb), BLUE(rgb));
  OUT_STR(buf);
  }
  #endif
*** ../vim-7.4.1772/src/version.c   2016-04-22 10:14:01.003848576 +0200
--- src/version.c   2016-04-22 11:22:18.497894688 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1773,
  /**/

-- 
A poem:read aloud:

<> !*''#   Waka waka bang splat tick tick hash,
^"`$$- Caret quote back-tick dollar dollar dash,
!*=@$_ Bang splat equal at dollar under-score,
%*<> ~#4   Percent splat waka waka tilde number four,
&[]../ Ampersand bracket bracket dot dot slash,
|{,,SYSTEM HALTED  Vertical-bar curly-bracket comma comma CRASH.

Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand Rapids, MI.)

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Dominique Pelle wrote:

> Nikolay Aleksandrovich Pavlov  wrote:
> 
> > 2016-04-21 22:39 GMT+03:00 Kent Sibilev :
> >> On Thursday, April 21, 2016 at 3:11:42 PM UTC-4, Bram Moolenaar wrote:
> >>> Patch 7.4.1770
> >>> Problem:Cannot use true color in the terminal.
> >>> Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> >>> Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> >>> runtime/doc/various.txt, src/auto/configure, src/config.h.in,
> >>> src/configure.in, src/eval.c, src/globals.h, src/hardcopy.c,
> >>> src/option.c, src/option.h, src/proto/term.pro, src/screen.c,
> >>> src/structs.h, src/syntax.c, src/term.c, src/term.h,
> >>> src/version.c, src/vim.h
> >>>
> >>
> >> That's great, but how do I set it?
> >>
> >> :set guicolors?
> >> E519: Option not supported: guicolors?
> >> :echo &guicolors
> >> 0
> >> :set guicolors
> >> :echo &guicolors
> >> 0
> >>
> >> Also now when running 'make install'  I get the following error at the end:
> >>
> >> if test -d /usr/local/share/applications -a -w 
> >> /usr/local/share/applications; then \
> >>cp ../runtime/vim.desktop \
> >> ../runtime/gvim.desktop \
> >> /usr/local/share/applications; \
> >>if test -z "" -a -x ; then \
> >>-q /usr/local/share/applications; \
> >>fi \
> >> fi
> >> /bin/sh: line 0: test: argument expected
> >
> > To get &guicolors you should use --enable-termtruecolor at configure
> > stage. Not sure why you get that error at `make install`, AFAIR I did
> > not edit anything that should affect installation process.
> 
> Hi Nikolay
> 
> I just tried it on xubuntu-14.04.4 (xfce4-terminal, TERM=xterm-256color)
> but it does not work yet for me and there are compilation warnings:

I can fix the obvious problems, but it appears some part of the patch
went missing.  I had to merge manually.

-- 
WOMAN:   Well, 'ow did you become king then?
ARTHUR:  The Lady of the Lake, [angels sing] her arm clad in the purest
 shimmering samite, held aloft Excalibur from the bosom of the water
 signifying by Divine Providence that I, Arthur, was to carry
 Excalibur.  [singing stops] That is why I am your king!
  The Quest for the Holy Grail (Monty Python)

 /// 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: How to detect i_CTRL-X submode in Vimscript?

2016-04-22 Fir de Conversatie boss
I see this was fixed in Vim 7.4.1758.

Thank you!

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

2016-04-22 Fir de Conversatie michele . bertasi
Hi Kazunobu Kuriyama,

I had a similar issue (https://github.com/vim/vim/issues/772). I've tested your 
patch and it works!

Kind regards,
Michele Bertasi

Il giorno venerdì 22 aprile 2016 05:09:49 UTC+2, Kazunobu Kuriyama ha scritto:
> Hi, Kent and Christian
> 
> 
> The error is due to Patch 7.4.1767, which I sent to Bram a few months ago.
> 
> 
> On my PC,  $(UPDATE_DESKTOP_DATABASE) is set to the string "no" when the 
> executable is not available, so I didn't notice there was the case where the 
> variable remained undefined, which resulted in the reported shell error.
> 
> 
> The attached patch should fix the issue,  In addition to that, it handles the 
> case where $(GTK_UPDATE_ICON_CACHE) is undefined as well.
> 
> 
> Since the patch is so simple that I think one can edit src/Makefile manually 
> and try Nikolay's great new feature even before the fix is officially 
> included.
> 
> 
> Sorry about the inconvenience.
> 
> 
> Now that the latest released version of tmux (2.2) supports true color, the 
> enhancement and the inclusion are definitely timely, and I'm happy with it,  
> Thanks a lot, Nikolay and Bram.
> 
> 
> P.S. In my case, I saw several compiler warnings about comparison between 
> unsigned long and guicolor_T in screen.c and syntax.c.  Also, the variable 
> color at term.c:1385 shadows the local variable at 1342.
> 
> 
> Best regards,
> Kazunobu Kuriyama
> 
> 
> 
> 
> 
> 
> 2016-04-22 4:57 GMT+09:00 Christian Brabandt :
> Hi Kent!
> 
> 
> 
> 
> 
> On Do, 21 Apr 2016, Kent Sibilev wrote:
> 
> 
> 
> > On Thursday, April 21, 2016 at 3:11:42 PM UTC-4, Bram Moolenaar wrote:
> 
> > > Patch 7.4.1770
> 
> > > Problem:    Cannot use true color in the terminal.
> 
> > > Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> 
> > > Files:      runtime/doc/options.txt, runtime/doc/term.txt,
> 
> > >             runtime/doc/various.txt, src/auto/configure, src/config.h.in,
> 
> > >             src/configure.in, src/eval.c, src/globals.h, src/hardcopy.c,
> 
> > >             src/option.c, src/option.h, src/proto/term.pro, src/screen.c,
> 
> > >             src/structs.h, src/syntax.c, src/term.c, src/term.h,
> 
> > >             src/version.c, src/vim.h
> 
> > >
> 
> >
> 
> > That's great, but how do I set it?
> 
> >
> 
> > :set guicolors?
> 
> > E519: Option not supported: guicolors?
> 
> > :echo &guicolors
> 
> > 0
> 
> > :set guicolors
> 
> > :echo &guicolors
> 
> > 0
> 
> >
> 
> > Also now when running 'make install'  I get the following error at the end:
> 
> >
> 
> > if test -d /usr/local/share/applications -a -w 
> > /usr/local/share/applications; then \
> 
> >            cp ../runtime/vim.desktop \
> 
> >                 ../runtime/gvim.desktop \
> 
> >                 /usr/local/share/applications; \
> 
> >            if test -z "" -a -x ; then \
> 
> >                -q /usr/local/share/applications; \
> 
> >            fi \
> 
> >         fi
> 
> > /bin/sh: line 0: test: argument expected
> 
> 
> 
> looks like $(UPDATE_DESKTOP_DATABASE) is not defined. Hm, perhaps this
> 
> is missing from the Makefile?
> 
> 
> 
> 
> 
> Best,
> 
> Christian
> 
> --
> 
> Es gibt kein gutes Gewissen sondern nur ein schlechtes Gedächtnis.
> 
> 
> 
> 
> 
> --
> 
> --
> 
> 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+u...@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.


Re: Patch 7.4.1770

2016-04-22 Fir de Conversatie Christian Brabandt
Hi Bram!

On Fr, 22 Apr 2016, Bram Moolenaar wrote:

> 
> Nikolay Pavlov wrote:
> 
> > 2016-04-21 22:39 GMT+03:00 Kent Sibilev :
> > > On Thursday, April 21, 2016 at 3:11:42 PM UTC-4, Bram Moolenaar wrote:
> > >> Patch 7.4.1770
> > >> Problem:Cannot use true color in the terminal.
> > >> Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> > >> Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> > >> runtime/doc/various.txt, src/auto/configure, src/config.h.in,
> > >> src/configure.in, src/eval.c, src/globals.h, src/hardcopy.c,
> > >> src/option.c, src/option.h, src/proto/term.pro, src/screen.c,
> > >> src/structs.h, src/syntax.c, src/term.c, src/term.h,
> > >> src/version.c, src/vim.h
> > >>
> > >
> > > That's great, but how do I set it?
> > >
> > > :set guicolors?
> > > E519: Option not supported: guicolors?
> > > :echo &guicolors
> > > 0
> > > :set guicolors
> > > :echo &guicolors
> > > 0
> > >
> > > Also now when running 'make install'  I get the following error at the 
> > > end:
> > >
> > > if test -d /usr/local/share/applications -a -w 
> > > /usr/local/share/applications; then \
> > >cp ../runtime/vim.desktop \
> > > ../runtime/gvim.desktop \
> > > /usr/local/share/applications; \
> > >if test -z "" -a -x ; then \
> > >-q /usr/local/share/applications; \
> > >fi \
> > > fi
> > > /bin/sh: line 0: test: argument expected
> > 
> > To get &guicolors you should use --enable-termtruecolor at configure
> > stage. Not sure why you get that error at `make install`, AFAIR I did
> > not edit anything that should affect installation process.
> 
> That install problem is from another patch.
> 
> I was wondering why in this patch the feature always has to be enabled
> manually.  Should we not always included it for HUGE features, or even
> less?  Since the actual effect is behind an option, including the
> feature is harmless, right?

Yes please

Best,
Christian
-- 
Geisterfahrer sind sehr entgegenkommend.
Dumm ist nur, daß sie die Schilder immer erst im Rückspiegel lesen können.

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1772 (after 7.4.1767)
Problem:Installation fails when $GTK_UPDATE_ICON_CACHE is empty.
Solution:   Add quotes. (Kazunobu Kuriyama)
Files:  src/Makefile


*** ../vim-7.4.1771/src/Makefile2016-04-21 18:20:03.654235895 +0200
--- src/Makefile2016-04-22 10:11:09.981612994 +0200
***
*** 2363,2369 
if test -d $(ICON48PATH) -a -w $(ICON48PATH) \
-a ! -f $(ICON48PATH)/gvim.png; then \
   $(INSTALL_DATA) $(SCRIPTSOURCE)/vim48x48.png $(ICON48PATH)/gvim.png; 
\
!  if test -z "$(DESTDIR)" -a -x $(GTK_UPDATE_ICON_CACHE) \
   -a -w $(ICONTHEMEPATH) \
   -a -f $(ICONTHEMEPATH)/index.theme; then \
$(GTK_UPDATE_ICON_CACHE) -q $(ICONTHEMEPATH); \
--- 2363,2369 
if test -d $(ICON48PATH) -a -w $(ICON48PATH) \
-a ! -f $(ICON48PATH)/gvim.png; then \
   $(INSTALL_DATA) $(SCRIPTSOURCE)/vim48x48.png $(ICON48PATH)/gvim.png; 
\
!  if test -z "$(DESTDIR)" -a -x "$(GTK_UPDATE_ICON_CACHE)" \
   -a -w $(ICONTHEMEPATH) \
   -a -f $(ICONTHEMEPATH)/index.theme; then \
$(GTK_UPDATE_ICON_CACHE) -q $(ICONTHEMEPATH); \
***
*** 2381,2387 
   $(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
$(SCRIPTSOURCE)/gvim.desktop \
$(DESKTOPPATH); \
!  if test -z "$(DESTDIR)" -a -x $(UPDATE_DESKTOP_DATABASE); then \
  $(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
   fi \
fi
--- 2381,2387 
   $(INSTALL_DATA) $(SCRIPTSOURCE)/vim.desktop \
$(SCRIPTSOURCE)/gvim.desktop \
$(DESKTOPPATH); \
!  if test -z "$(DESTDIR)" -a -x "$(UPDATE_DESKTOP_DATABASE)"; then \
  $(UPDATE_DESKTOP_DATABASE) -q $(DESKTOPPATH); \
   fi \
fi
*** ../vim-7.4.1771/src/version.c   2016-04-22 10:00:31.888192784 +0200
--- src/version.c   2016-04-22 10:12:44.240640493 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1772,
  /**/

-- 
ARTHUR:  I am your king!
WOMAN:   Well, I didn't vote for you.
ARTHUR:  You don't vote for kings.
WOMAN:   Well, 'ow did you become king then?
  The Quest for the Holy Grail (Monty Python)

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Nikolay Pavlov wrote:

> 2016-04-21 22:39 GMT+03:00 Kent Sibilev :
> > On Thursday, April 21, 2016 at 3:11:42 PM UTC-4, Bram Moolenaar wrote:
> >> Patch 7.4.1770
> >> Problem:Cannot use true color in the terminal.
> >> Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> >> Files:  runtime/doc/options.txt, runtime/doc/term.txt,
> >> runtime/doc/various.txt, src/auto/configure, src/config.h.in,
> >> src/configure.in, src/eval.c, src/globals.h, src/hardcopy.c,
> >> src/option.c, src/option.h, src/proto/term.pro, src/screen.c,
> >> src/structs.h, src/syntax.c, src/term.c, src/term.h,
> >> src/version.c, src/vim.h
> >>
> >
> > That's great, but how do I set it?
> >
> > :set guicolors?
> > E519: Option not supported: guicolors?
> > :echo &guicolors
> > 0
> > :set guicolors
> > :echo &guicolors
> > 0
> >
> > Also now when running 'make install'  I get the following error at the end:
> >
> > if test -d /usr/local/share/applications -a -w 
> > /usr/local/share/applications; then \
> >cp ../runtime/vim.desktop \
> > ../runtime/gvim.desktop \
> > /usr/local/share/applications; \
> >if test -z "" -a -x ; then \
> >-q /usr/local/share/applications; \
> >fi \
> > fi
> > /bin/sh: line 0: test: argument expected
> 
> To get &guicolors you should use --enable-termtruecolor at configure
> stage. Not sure why you get that error at `make install`, AFAIR I did
> not edit anything that should affect installation process.

That install problem is from another patch.

I was wondering why in this patch the feature always has to be enabled
manually.  Should we not always included it for HUGE features, or even
less?  Since the actual effect is behind an option, including the
feature is harmless, right?

-- 
Some say the world will end in fire; some say in segfaults.
I say it will end in a curly bracket.

 /// 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: Lack of integer overflow handling in range() and for

2016-04-22 Fir de Conversatie Lekare
Den torsdag 21 april 2016 kl. 17:37:54 UTC+2 skrev Bram Moolenaar:
> Max Lekare wrote:
> 
> > There is no handling for limits or stride greater/smaller than
> > LONG_MAX/LONG_MIN in the range() function.
> > Instead the results vary from the error message "E727: Start past end"
> > when at least one of the arguments are close to the limit ex:
> > 
> > :put =range(2147483647,2147483648)
> > 
> > to an output of a seemingly random list of negative numbers, ex:
> > 
> > :put =range(222050,222060)
> > 
> > to vim crashing when arguments are too long.
> > The same behavior can be observed when trying to accomplish a similar
> > thing with a for loop.
> > 
> > :for i in range(222050,222060) | put=i | endfor
> > 
> > Is it possible to validate the input to avoid this behavior?
> 
> range() was meant to be used for smaller numbers. The behavior with big
> numbers depends on the compiler, size of int.  So ranges outside of 32
> bit signed int is undefined.
> 
> Vim should not crash though.  What command crashes your Vim?
> 
> -- 
> The question is:  What do you do with your life?
> The wrong answer is: Become the richest guy in the graveyard.
>   (billionaire and Oracle founder Larry Ellison)
> 
>  /// 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///

When entering something really big, like

:put =range(300,3)

Vim quits with message

Vim: Caught deadly signal SEGV
Vim: Finished.
[1]75479 segmentation fault  \vim
 %

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

2016-04-22 Fir de Conversatie Bram Moolenaar

Patch 7.4.1771 (after 7.4.1768)
Problem:Warning for unused variable.
Solution:   Add #ifdef. (John Marriott)
Files:  src/eval.c


*** ../vim-7.4.1770/src/eval.c  2016-04-21 21:08:11.789949009 +0200
--- src/eval.c  2016-04-22 09:42:48.815115620 +0200
***
*** 98,104 
--- 98,106 
  static char *e_listdictarg = N_("E712: Argument of %s must be a List or 
Dictionary");
  static char *e_listreq = N_("E714: List required");
  static char *e_dictreq = N_("E715: Dictionary required");
+ #ifdef FEAT_QUICKFIX
  static char *e_stringreq = N_("E928: String required");
+ #endif
  static char *e_toomanyarg = N_("E118: Too many arguments for function: %s");
  static char *e_dictkey = N_("E716: Key not present in Dictionary: %s");
  static char *e_funcexts = N_("E122: Function %s already exists, add ! to 
replace it");
*** ../vim-7.4.1770/src/version.c   2016-04-21 21:08:11.797948928 +0200
--- src/version.c   2016-04-22 09:44:03.178353437 +0200
***
*** 755,756 
--- 755,758 
  {   /* Add new patch number below this line */
+ /**/
+ 1771,
  /**/

-- 
ARTHUR:  Be quiet!
DENNIS:  --but by a two-thirds majority in the case of more--
ARTHUR:  Be quiet!  I order you to be quiet!
WOMAN:   Order, eh -- who does he think he is?
ARTHUR:  I am your king!
  The Quest for the Holy Grail (Monty Python)

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

2016-04-22 Fir de Conversatie Bram Moolenaar

John Marriott wrote:

> On 22-Apr-2016 3:40 AM, Bram Moolenaar wrote:
> > Patch 7.4.1768
> > Problem:Arguments of setqflist() are not checked properly.
> > Solution:   Add better checks, add a test. (Nikolai Pavlov, Hirohito 
> > Higashi,
> >  closes #661)
> > Files:  src/eval.c, src/testdir/test_quickfix.vim
> >
> >
> This patch throws a warning (using mingw64) if FEAT_QUICKFIX is 
> disabled, like so:

Thanks!

-- 
ARTHUR:  Then who is your lord?
WOMAN:   We don't have a lord.
ARTHUR:  What?
DENNIS:  I told you.  We're an anarcho-syndicalist commune.  We take it in
 turns to act as a sort of executive officer for the week.
  The Quest for the Holy Grail (Monty Python)

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