Re: The return value from channel_first_nl() should be checked before use in channel.c

2017-02-27 Fir de Conversatie shqking
On Tuesday, February 28, 2017 at 4:36:18 AM UTC+8, Bram Moolenaar wrote:
> shqking wrote:
> 
> > Null value check is needed in channel.c file.
> > The vulnerable code is at 
> > https://github.com/vim/vim/blob/master/src/channel.c#L3311 .
> > 
> > Function channel_first_nl() might return NULL.
> > Therefore, we should check whether nl is NULL or not before using it at 
> > line 3322.
> 
> It's not obvious, but the check is actually inside the while loop above.
> It keeps looping until a message was received, and when mode is MODE_NL
> it calls channel_first_nl() to check it doesn't return NULL.
> The only other exit from the while loop is with "return".
> 
> -- 
> Now it is such a bizarrely improbable coincidence that anything as
> mind-bogglingly useful as the Babel fish could have evolved purely by chance
> that some thinkers have chosen to see it as a final and clinching proof of the
> NON-existence of God.
> The argument goes something like this: 'I refuse to prove that I exist,' says
> God, 'for proof denies faith, and without faith I am nothing.'
> 'But,' says Man, 'the Babel fish is a dead giveaway, isn't it?  It could not
> have evolved by chance.  It proves you exist, and so therefore, by your own
> arguments, you don't.  QED.'
> 'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
> puff of logic.
> 'Oh, that was easy,' says Man, and for an encore goes on to prove that black
> is white and gets himself killed on the next pedestrian crossing.
>   -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
> 
>  /// 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///

ok, i see.
Thanks for your reply.

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

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


Patch 8.0.0386

2017-02-27 Fir de Conversatie Bram Moolenaar

Patch 8.0.0386
Problem:Tiny build has a problem with generating the options test.
Solution:   Change the "if" to skip over statements.
Files:  src/gen_opt_test.vim


*** ../vim-8.0.0385/src/gen_opt_test.vim2017-02-25 21:37:53.868571917 
+0100
--- src/gen_opt_test.vim2017-02-27 22:55:09.666299413 +0100
***
*** 1,10 
  " Script to generate testdir/opt_test.vim from option.c
  
- if 0
-   finish
- endif
- 
  set cpo=
  set nomore
  
  let script = [
--- 1,10 
  " Script to generate testdir/opt_test.vim from option.c
  
  set cpo=
+ 
+ " Only do this when build with the +eval feature.
+ if 1
+ 
  set nomore
  
  let script = [
***
*** 130,136 
\ 'winaltkeys': [['menu', 'no'], ['', 'xxx']],
\
\ 'luadll': [[], []],
-   \ 'macatsui': [[], []],
\ 'perldll': [[], []],
\ 'pythondll': [[], []],
\ 'pythonthreedll': [[], []],
--- 130,135 
***
*** 192,195 
--- 191,196 
  
  call writefile(script, 'testdir/opt_test.vim')
  
+ endif
+ 
  qa!
*** ../vim-8.0.0385/src/version.c   2017-02-27 21:48:06.217790605 +0100
--- src/version.c   2017-02-27 22:56:29.485748868 +0100
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 386,
  /**/

-- 
The startling truth finally became apparent, and it was this: Numbers
written on restaurant checks within the confines of restaurants do not follow
the same mathematical laws as numbers written on any other pieces of paper in
any other parts of the Universe.  This single statement took the scientific
world by storm.  So many mathematical conferences got held in such good
restaurants that many of the finest minds of a generation died of obesity and
heart failure, and the science of mathematics was put back by years.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

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

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


Patch 8.0.0385

2017-02-27 Fir de Conversatie Bram Moolenaar

Patch 8.0.0385
Problem:No tests for arabic.
Solution:   Add a first test for arabic. (Dominique Pelle, closes #1518)
Files:  src/Makefile, src/testdir/Make_all.mak,
src/testdir/test_arabic.vim


*** ../vim-8.0.0384/src/Makefile2017-02-25 20:40:31.762696457 +0100
--- src/Makefile2017-02-27 21:38:03.693920587 +0100
***
*** 2092,2097 
--- 2092,2098 
  
  # Run individual NEW style test, assuming that Vim was already compiled.
  test_arglist \
+   test_arabic \
test_assert \
test_assign \
test_autochdir \
*** ../vim-8.0.0384/src/testdir/Make_all.mak2017-02-25 14:20:56.784372170 
+0100
--- src/testdir/Make_all.mak2017-02-27 21:38:03.693920587 +0100
***
*** 133,139 
  
  # Tests using runtest.vim.vim.
  # Keep test_alot*.res as the last one, sort the others.
! NEW_TESTS = test_arglist.res \
test_assert.res \
test_autochdir.res \
test_backspace_opt.res \
--- 133,140 
  
  # Tests using runtest.vim.vim.
  # Keep test_alot*.res as the last one, sort the others.
! NEW_TESTS = test_arabic.res \
!   test_arglist.res \
test_assert.res \
test_autochdir.res \
test_backspace_opt.res \
*** ../vim-8.0.0384/src/testdir/test_arabic.vim 2017-02-27 21:47:44.373939962 
+0100
--- src/testdir/test_arabic.vim 2017-02-27 21:47:12.370158836 +0100
***
*** 0 
--- 1,92 
+ " Simplistic testing of Arabic mode.
+ 
+ if !has('arabic')
+   finish
+ endif
+ 
+ set encoding=utf-8
+ scriptencoding utf-8
+ 
+ " Return list of utf8 sequences of each character at line lnum.
+ " Combining characters are treated as a single item.
+ func GetCharsUtf8(lnum)
+   call cursor(a:lnum, 1)
+   let chars = []
+   let numchars = strchars(getline('.'), 1)
+   for i in range(1, numchars)
+ exe 'norm ' i . '|'
+ call add(chars, execute('norm g8'))
+   endfor
+   return chars
+ endfunc
+ 
+ func Test_arabic_toggle()
+   set arabic
+   call assert_equal(1, )
+   call assert_equal(1, )
+   call assert_equal('arabic', )
+   call assert_equal(1, )
+ 
+   set iminsert=1 imsearch=1
+   set arabic&
+   call assert_equal(0, )
+   call assert_equal(1, )
+   call assert_equal('arabic', )
+   call assert_equal(1, )
+   call assert_equal(0, )
+   call assert_equal(-1, )
+ 
+   set arabicshape& keymap= delcombine&
+ endfunc
+ 
+ func Test_arabic_input()
+   new
+   set arabic
+   " Typing sghl in Arabic insert mode should show the
+   " Arabic word 'Salaam' i.e. 'peace'.
+   call feedkeys('isghl', 'tx')
+   redraw
+   call assert_equal([
+   \ "\nd8 b3 ",
+   \ "\nd9 84 + d8 a7 ",
+   \ "\nd9 85 "], GetCharsUtf8(1))
+ 
+   " Without shaping, it should give individual Arabic letters.
+   set noarabicshape
+   redraw
+   call assert_equal([
+   \ "\nd8 b3 ",
+   \ "\nd9 84 ",
+   \ "\nd8 a7 ",
+   \ "\nd9 85 "], GetCharsUtf8(1))
+ 
+   set arabicshape&
+   set arabic&
+   bwipe!
+ endfunc
+ 
+ func Test_arabic_toggle_keymap()
+   new
+   set arabic
+   call feedkeys("i12\12\12", 'tx')
+   redraw
+   call assert_equal('١٢12١٢', getline('.'))
+   set arabic&
+   bwipe!
+ endfunc
+ 
+ func Test_delcombine()
+   new
+   set arabic
+   call feedkeys("isghl\\", 'tx')
+   redraw
+   call assert_equal(["\nd8 b3 ", "\nd9 84 "], GetCharsUtf8(1))
+ 
+   " Now the same with nodelcombine
+   set nodelcombine
+   %d
+   call feedkeys("isghl\\", 'tx')
+   call assert_equal(["\nd8 b3 "], GetCharsUtf8(1)) 
+   set arabic&
+   bwipe!
+ endfunc
*** ../vim-8.0.0384/src/version.c   2017-02-27 21:35:49.618842663 +0100
--- src/version.c   2017-02-27 21:39:05.661494810 +0100
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 385,
  /**/

-- 
I'm not familiar with this proof, but I'm aware of a significant
following of toddlers who believe that peanut butter is the solution
to all of life's problems...-- Tim Hammerquist

 /// 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: Unable to compile latest Vim

2017-02-27 Fir de Conversatie Christian J. Robinson

On Mon, 27 Feb 2017, Bram Moolenaar wrote:


Your lines look very different from what I have.
There is no b_changedtick in search.c.
Please check your "git pull" request.


I'm using mercurial, but I told it to revert search.c and it compiled. 
Odd, because I haven't been doing anything with the source.


Sorry for the invalid report.

- Christian

--
Christian J. Robinson 
Where are those flashbacks they promised me?

--
--
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: Unable to compile latest Vim

2017-02-27 Fir de Conversatie Bram Moolenaar

Christian J. Robinson wrote:

> I did an 'hg pull --update' yesterday and tried to compile the latest 
> Vim, but I get this fatal error:
> 
> search.c: In function ‘do_search’:
> search.c:1472:45: warning: suggest parentheses around ‘&&’ within ‘||’ 
> [-Wparentheses]
>if (!shortmess(SHM_SEARCH) && (dirc == '/' && lt(pos, curwin->w_cursor)
>   ^
> search.c: In function ‘search_stat’:
> search.c:4888:28: error: ‘buf_T {aka struct file_buffer}’ has no member named 
> ‘b_changedtick’
>   if (!(chgtick == curbuf->b_changedtick &&
>  ^
> search.c:4973:18: error: ‘buf_T {aka struct file_buffer}’ has no member named 
> ‘b_changedtick’
>chgtick = curbuf->b_changedtick;
>^
> make: *** [Makefile:3194: objects/search.o] Error 1

Your lines look very different from what I have.
There is no b_changedtick in search.c.
Please check your "git pull" request. 

-- 
"So this is it," said Arthur, "we are going to die."
"Yes," said Ford, "except...no!  Wait a minute!"  He suddenly lunged across
the chamber at something behind Arthur's line of vision.  "What's this
switch?" he cried.
"What?   Where?" cried Arthur, twisting around.
"No, I was only fooling," said Ford, "we are going to die after all."
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

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

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


Patch 8.0.0384

2017-02-27 Fir de Conversatie Bram Moolenaar

Patch 8.0.0384
Problem:Timer test failed for no apparent reason.
Solution:   Mark the test as flaky.
Files:  src/testdir/runtest.vim


*** ../vim-8.0.0383/src/testdir/runtest.vim 2017-02-23 19:00:28.512904202 
+0100
--- src/testdir/runtest.vim 2017-02-27 21:31:45.620474255 +0100
***
*** 165,170 
--- 165,171 
\ 'Test_collapse_buffers()',
\ 'Test_communicate()',
\ 'Test_nb_basic()',
+   \ 'Test_oneshot()',
\ 'Test_pipe_through_sort_all()',
\ 'Test_pipe_through_sort_some()',
\ 'Test_reltime()',
*** ../vim-8.0.0383/src/version.c   2017-02-27 21:11:29.992530355 +0100
--- src/version.c   2017-02-27 21:32:48.068061905 +0100
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 384,
  /**/

-- 
One difference between a man and a machine is that a machine is quiet
when well oiled.

 /// 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: The return value from channel_first_nl() should be checked before use in channel.c

2017-02-27 Fir de Conversatie Bram Moolenaar

shqking wrote:

> Null value check is needed in channel.c file.
> The vulnerable code is at 
> https://github.com/vim/vim/blob/master/src/channel.c#L3311 .
> 
> Function channel_first_nl() might return NULL.
> Therefore, we should check whether nl is NULL or not before using it at line 
> 3322.

It's not obvious, but the check is actually inside the while loop above.
It keeps looping until a message was received, and when mode is MODE_NL
it calls channel_first_nl() to check it doesn't return NULL.
The only other exit from the while loop is with "return".

-- 
Now it is such a bizarrely improbable coincidence that anything as
mind-bogglingly useful as the Babel fish could have evolved purely by chance
that some thinkers have chosen to see it as a final and clinching proof of the
NON-existence of God.
The argument goes something like this: 'I refuse to prove that I exist,' says
God, 'for proof denies faith, and without faith I am nothing.'
'But,' says Man, 'the Babel fish is a dead giveaway, isn't it?  It could not
have evolved by chance.  It proves you exist, and so therefore, by your own
arguments, you don't.  QED.'
'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
puff of logic.
'Oh, that was easy,' says Man, and for an encore goes on to prove that black
is white and gets himself killed on the next pedestrian crossing.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

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

2017-02-27 Fir de Conversatie Bram Moolenaar

Christ van Willegen wrote:

> Op 27 feb. 2017 20:34 schreef "Bram Moolenaar" :
> 
> 
> Patch 8.0.0382 (after 8.0.0380)
> Problem:Warning in tiny build for unused variable. (Tony Mechelynck)
> Solution:   Add #ifdefs.
> Files:  src/screen.c
> 
> 
> *** ../vim-8.0.0381/src/screen.c2017-02-26 19:40:55.869921651 +0100
> --- src/screen.c2017-02-27 20:31:17.99891 +0100
> ***
> *** 4189,4195 
> --- 4189,4197 
> }
> else
> {
> + #ifdef FEAT_LINEBREAK
> int c0;
> + #endif
> 
> if (p_extra_free != NULL)
> {
> ***
> *** 4199,4205 
> --- 4201,4209 
> /*
>  * Get a character from the line itself.
>  */
> + #ifdef FEAT_LINEBREAK
> c0 = c = *ptr;
> + #endif
> 
> 
> 
> The screen.c before 0.380 had:
> 
> /*
>  * Get a character from the line itself.
>  */
> !   c = *ptr
> 
> Now you miss that assignment into c.

Darn, only did that further below, forgot this one.

-- 
How To Keep A Healthy Level Of Insanity:
18. When leaving the zoo, start running towards the parking lot,
yelling "run for your lives, they're loose!!"

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

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

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


Patch 8.0.0383

2017-02-27 Fir de Conversatie Bram Moolenaar

Patch 8.0.0383 (after 8.0.0382)
Problem:Misplaced #ifdef. (Christ van Willigen)
Solution:   Split assignment.
Files:  src/screen.c


*** ../vim-8.0.0382/src/screen.c2017-02-27 20:33:42.351519580 +0100
--- src/screen.c2017-02-27 21:09:24.853363193 +0100
***
*** 4201,4208 
/*
 * Get a character from the line itself.
 */
  #ifdef FEAT_LINEBREAK
!   c0 = c = *ptr;
  #endif
  #ifdef FEAT_MBYTE
if (has_mbyte)
--- 4201,4209 
/*
 * Get a character from the line itself.
 */
+   c = *ptr;
  #ifdef FEAT_LINEBREAK
!   c0 = *ptr;
  #endif
  #ifdef FEAT_MBYTE
if (has_mbyte)
*** ../vim-8.0.0382/src/version.c   2017-02-27 20:33:42.351519580 +0100
--- src/version.c   2017-02-27 21:11:03.560706206 +0100
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 383,
  /**/

-- 
In many of the more relaxed civilizations on the Outer Eastern Rim of the
Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
great "Encyclopedia Galactica" as the standard repository of all knowledge
and wisdom, for though it has many omissions and contains much that is
apocryphal, or at least wildly inaccurate, it scores over the older, more
pedestrian work in two important respects.
First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
inscribed in large friendly letters on its cover.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// 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: Unable to compile latest Vim

2017-02-27 Fir de Conversatie Christian J. Robinson

On Mon, 27 Feb 2017, Christian J. Robinson wrote:

search.c:4973:18: error: ‘buf_T {aka struct file_buffer}’ has no 
member named ‘b_changedtick’

 chgtick = curbuf->b_changedtick;
 ^
make: *** [Makefile:3194: objects/search.o] Error 1


Brief update.  I can build this cleanly on Linux (CentOS 7.3) but not 
on Cygwin or with Cygwin's mingw compiler.


- Christian

--
Christian J. Robinson 
Still here? The message is over Go Home.   Go On!

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

2017-02-27 Fir de Conversatie Christ van Willegen
Hi,

Op 27 feb. 2017 20:34 schreef "Bram Moolenaar" :


Patch 8.0.0382 (after 8.0.0380)
Problem:Warning in tiny build for unused variable. (Tony Mechelynck)
Solution:   Add #ifdefs.
Files:  src/screen.c


*** ../vim-8.0.0381/src/screen.c2017-02-26 19:40:55.869921651 +0100
--- src/screen.c2017-02-27 20:31:17.99891 +0100
***
*** 4189,4195 
--- 4189,4197 
}
else
{
+ #ifdef FEAT_LINEBREAK
int c0;
+ #endif

if (p_extra_free != NULL)
{
***
*** 4199,4205 
--- 4201,4209 
/*
 * Get a character from the line itself.
 */
+ #ifdef FEAT_LINEBREAK
c0 = c = *ptr;
+ #endif



The screen.c before 0.380 had:

/*
 * Get a character from the line itself.
 */
!   c = *ptr

Now you miss that assignment into c.

Christ van Willegen

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

2017-02-27 Fir de Conversatie Bram Moolenaar

Kazunobu Kuriyama wrote:

> 2017-02-27 18:39 GMT+09:00 Ken Takata :
> 
> > Hi Bram,
> >
> > 2017/2/27 Mon 18:05:22 UTC+9 Bram Moolenaar wrote:
> > > Hirohito Higashi wrote:
> > >
> > > > 2017-2-26(Sun) 23:09:12 UTC+9 Bram Moolenaar:
> > > > > Patch 8.0.0375
> > > > > Problem:The "+ register is not tested.
> > > > > Solution:   Add a test using another Vim instance to change the "+
> > register.
> > > > > (Kazuki Kuriyama)
> > > > > Files:  src/testdir/test_gui.vim
> > > > [...]
> > > >
> > > > You are mistaking the contributor name.
> > > > `Kazunobu Kuriyama` is correct.
> > > > I think that it is better to modify it on runtime/doc/version8.txt
> > >
> > > Hah, auto completion used Kazuki from Kazuki Sakamoto.  Should have
> > > noticed that, sorry.
> >
> > Also for v8.0.0361.
> >
> > Regards,
> > Ken Takata
> >
> 
> Ken and Hirohito,
> 
> Thank you all for the heads-up.   I didn't notice those typos.
> 
> Bram and my fellow devs,
> 
> In case you forget my first name with the correct spelling, it's fine to me
> that the name is shortened to Kazu or Kaz.  Actually a man and a woman who
> named their son Kazunobu always call me like that way, and I hardly
> remember they called me Kazunobu. Maybe the name was turned out to be too
> lengthy even for them who are responsible for that :)

Thanks for being flexible.  I know there is also a long standing
discussion of whether first name or last name should go first.
I tend to just copy what I get.

And then there are github user names...

-- 
How To Keep A Healthy Level Of Insanity:
15. Five days in advance, tell your friends you can't attend their
party because you're not in the mood.

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

2017-02-27 Fir de Conversatie Bram Moolenaar

Tony Mechelynck wrote:

> On Sun, Feb 26, 2017 at 7:41 PM, Bram Moolenaar  wrote:
> >
> > Patch 8.0.0380
> > Problem:With 'linebreak' set and 'breakat' includes ">" a double-wide
> > character results in "<<" displayed.
> > Solution:   Check for the character not to be replaced. (Ozaki Kiichi,
> > closes #1456)
> > Files:  src/screen.c, src/testdir/test_listlbr_utf8.vim
> 
> Warning in Tiny but not in Huge:
> 
> gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1-o objects/screen.o
> screen.c
> screen.c: In function ‘win_line’:
> screen.c:4192:10: warning: variable ‘c0’ set but not used
> [-Wunused-but-set-variable]
>   int c0;
>   ^

Thanks for reporting, I'll add a few #ifdefs

-- 
How To Keep A Healthy Level Of Insanity:
16. Have your coworkers address you by your wrestling name, Rock Hard Kim.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

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

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


Patch 8.0.0382

2017-02-27 Fir de Conversatie Bram Moolenaar

Patch 8.0.0382 (after 8.0.0380)
Problem:Warning in tiny build for unused variable. (Tony Mechelynck)
Solution:   Add #ifdefs.
Files:  src/screen.c


*** ../vim-8.0.0381/src/screen.c2017-02-26 19:40:55.869921651 +0100
--- src/screen.c2017-02-27 20:31:17.99891 +0100
***
*** 4189,4195 
--- 4189,4197 
}
else
{
+ #ifdef FEAT_LINEBREAK
int c0;
+ #endif
  
if (p_extra_free != NULL)
{
***
*** 4199,4205 
--- 4201,4209 
/*
 * Get a character from the line itself.
 */
+ #ifdef FEAT_LINEBREAK
c0 = c = *ptr;
+ #endif
  #ifdef FEAT_MBYTE
if (has_mbyte)
{
***
*** 4216,4222 
/* Overlong encoded ASCII or ASCII with composing char
 * is displayed normally, except a NUL. */
if (mb_c < 0x80)
!   c0 = c = mb_c;
mb_utf8 = TRUE;
  
/* At start of the line we can have a composing char.
--- 4220,4231 
/* Overlong encoded ASCII or ASCII with composing char
 * is displayed normally, except a NUL. */
if (mb_c < 0x80)
!   {
!   c = mb_c;
! # ifdef FEAT_LINEBREAK
!   c0 = mb_c;
! # endif
!   }
mb_utf8 = TRUE;
  
/* At start of the line we can have a composing char.
*** ../vim-8.0.0381/src/version.c   2017-02-26 19:59:55.578563703 +0100
--- src/version.c   2017-02-27 20:33:17.191681633 +0100
***
*** 766,767 
--- 766,769 
  {   /* Add new patch number below this line */
+ /**/
+ 382,
  /**/

-- 
How To Keep A Healthy Level Of Insanity:
17. When the money comes out the ATM, scream "I won!, I won! 3rd
time this week!"

 /// 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: [doc][patch] Document for :filter!, etc.

2017-02-27 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

> I attached another patch for the document.
> 
> * Two functions were missing from usr_41.txt.
> * A typo in version8.txt.

Thanks.  We can also make the difference between funcref() and
function() a bit more clear:

funcref()   get a Funcref for a function reference
function()  get a Funcref for a function name

-- 
How To Keep A Healthy Level Of Insanity:
13. Go to a poetry recital and ask why the poems don't rhyme.

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


Unable to compile latest Vim

2017-02-27 Fir de Conversatie Christian J. Robinson


I did an 'hg pull --update' yesterday and tried to compile the latest 
Vim, but I get this fatal error:


search.c: In function ‘do_search’:
search.c:1472:45: warning: suggest parentheses around ‘&&’ within ‘||’ 
[-Wparentheses]
  if (!shortmess(SHM_SEARCH) && (dirc == '/' && lt(pos, curwin->w_cursor)
 ^
search.c: In function ‘search_stat’:
search.c:4888:28: error: ‘buf_T {aka struct file_buffer}’ has no member named 
‘b_changedtick’
 if (!(chgtick == curbuf->b_changedtick &&
^
search.c:4973:18: error: ‘buf_T {aka struct file_buffer}’ has no member named 
‘b_changedtick’
  chgtick = curbuf->b_changedtick;
  ^
make: *** [Makefile:3194: objects/search.o] Error 1

--
Christian J. Robinson 
"Don't worry what people think, they don't do it very often."  -- Unknown

--
--
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] TeX: avoid indent after one-line environment (runtime/indent/tex.vim)

2017-02-27 Fir de Conversatie Charles E Campbell
Eisuke Kawashima wrote:
> Dear all and YiChao Zhou,
>
> Currently shiftwidth is inserted after a line containing \begin, which gives
>
> \begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}
>   \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}
>
> This patch avoids indent after one-line environment, which gives
>
> \begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}
> \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}
>
>
I suggest sending your patch to the indent/tex.vim maintainer.  It might
even get incorporated that way!

Chip Campbell

P.S. Look at $VIMRUNTIME/indent/tex.vim and you'll see YiChao's email
address.

-- 
-- 
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: [doc][patch] Document for :filter!, etc.

2017-02-27 Fir de Conversatie Ken Takata
Hi,

I attached another patch for the document.

* Two functions were missing from usr_41.txt.
* A typo in version8.txt.


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  d66f0a699f3354a07460d0d0b990b743ff197f4b

diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -694,6 +694,7 @@ Variables:		*var-functions*
 	type()			type of a variable
 	islocked()		check if a variable is locked
 	function()		get a Funcref for a function name
+	funcref()		get a Funcref for a function name
 	getbufvar()		get a variable value from a specific buffer
 	setbufvar()		set a variable in a specific buffer
 	getwinvar()		get a variable from specific window
@@ -928,6 +929,7 @@ Testing:*test-functions*
 	test_null_list()	return a null List
 	test_null_partial()	return a null Partial function
 	test_null_string()	return a null String
+	test_settime()		set the time Vim uses internally
 
 Inter-process communication:		*channel-functions*
 	ch_canread()		check if there is something to read
diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt
--- a/runtime/doc/version8.txt
+++ b/runtime/doc/version8.txt
@@ -426,7 +426,7 @@ When no vimrc file is found, the |defaul
 useful default values for new users.  That includes setting 'nocompatible'.
 Thus Vim no longer starts up in Vi compatible mode.  If you do want that,
 either create a .vimrc file that does "set compatible" or start Vim with
-"Vim -C".
+"vim -C".
 
 
 Support removed ~


Re: Patch 8.0.0375

2017-02-27 Fir de Conversatie Kazunobu Kuriyama
2017-02-27 18:39 GMT+09:00 Ken Takata :

> Hi Bram,
>
> 2017/2/27 Mon 18:05:22 UTC+9 Bram Moolenaar wrote:
> > Hirohito Higashi wrote:
> >
> > > 2017-2-26(Sun) 23:09:12 UTC+9 Bram Moolenaar:
> > > > Patch 8.0.0375
> > > > Problem:The "+ register is not tested.
> > > > Solution:   Add a test using another Vim instance to change the "+
> register.
> > > > (Kazuki Kuriyama)
> > > > Files:  src/testdir/test_gui.vim
> > > [...]
> > >
> > > You are mistaking the contributor name.
> > > `Kazunobu Kuriyama` is correct.
> > > I think that it is better to modify it on runtime/doc/version8.txt
> >
> > Hah, auto completion used Kazuki from Kazuki Sakamoto.  Should have
> > noticed that, sorry.
>
> Also for v8.0.0361.
>
> Regards,
> Ken Takata
>

Ken and Hirohito,

Thank you all for the heads-up.   I didn't notice those typos.

Bram and my fellow devs,

In case you forget my first name with the correct spelling, it's fine to me
that the name is shortened to Kazu or Kaz.  Actually a man and a woman who
named their son Kazunobu always call me like that way, and I hardly
remember they called me Kazunobu. Maybe the name was turned out to be too
lengthy even for them who are responsible for that :)

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

-- 
-- 
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] TeX: avoid indent after one-line environment (runtime/indent/tex.vim)

2017-02-27 Fir de Conversatie Eisuke Kawashima
Dear all and YiChao Zhou,

Currently shiftwidth is inserted after a line containing \begin, which gives

\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}
  \begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}

This patch avoids indent after one-line environment, which gives

\begin{pmatrix} 0 \\ 1 \\ \end{pmatrix}
\begin{pmatrix} 1 \\ 0 \\ \end{pmatrix}

Best Regards, 
-- 
Eisuke Kawashima

-- 
-- 
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/runtime/indent/tex.vim b/runtime/indent/tex.vim
index 0150bb9..ca137a6 100644
--- a/runtime/indent/tex.vim
+++ b/runtime/indent/tex.vim
@@ -209,7 +209,7 @@ function! GetTeXIndent() " {{{
 ""if line =~ '^\s*\\begin{\(.*\)}'  && line !~ 'verbatim' 
 " LH modification : \begin does not always start a line
 " ZYC modification : \end after \begin won't cause wrong indent anymore
-if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env
+if line =~ '\\begin{.*}' && line !~ '\\end{.*}' && line !~ g:tex_noindent_env
 let ind = ind + 
 let stay = 0
 


Re: Patch 8.0.0375

2017-02-27 Fir de Conversatie Bram Moolenaar

Hirohito Higashi wrote:

> 2017-2-26(Sun) 23:09:12 UTC+9 Bram Moolenaar:
> > Patch 8.0.0375
> > Problem:The "+ register is not tested.
> > Solution:   Add a test using another Vim instance to change the "+ register.
> > (Kazuki Kuriyama)
> > Files:  src/testdir/test_gui.vim
> [...]
> 
> You are mistaking the contributor name.
> `Kazunobu Kuriyama` is correct.
> I think that it is better to modify it on runtime/doc/version8.txt

Hah, auto completion used Kazuki from Kazuki Sakamoto.  Should have
noticed that, sorry.

-- 
How To Keep A Healthy Level Of Insanity:
12. Sing along at the opera.

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