Patch 8.1.0320

2018-08-22 Fir de Conversatie Bram Moolenaar


Patch 8.1.0320
Problem:Too much 'incsearch' highlight for pattern matching everything.
Solution:   Add the skiplen to the command and remove the line range.
(Christian Brabandt)  Check for empty pattern earlier.
Files:  src/ex_getln.c, src/testdir/test_search.vim,
src/testdir/dumps/Test_incsearch_substitute_09.dump


*** ../vim-8.1.0319/src/ex_getln.c  2018-08-18 21:23:00.787474060 +0200
--- src/ex_getln.c  2018-08-22 22:35:09.131882839 +0200
***
*** 285,290 
--- 285,291 
  char_u*dummy;
  exarg_T   ea;
  pos_T save_cursor;
+ int   use_last_pat;
  
  *skiplen = 0;
  *patlen = ccline.cmdlen;
***
*** 361,370 
  delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++;
  end = skip_regexp(p, delim, p_magic, NULL);
  
! if (end == p && *end != delim)
return FALSE;
- // found a non-empty pattern or //
  
  *skiplen = (int)(p - ccline.cmdbuff);
  *patlen = (int)(end - p);
  
--- 362,386 
  delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++;
  end = skip_regexp(p, delim, p_magic, NULL);
  
! use_last_pat = end == p && *end == delim;
! 
! if (end == p && !use_last_pat)
return FALSE;
  
+ // Don't do 'hlsearch' highlighting if the pattern matches everything.
+ if (!use_last_pat)
+ {
+   char c = *end;
+   int  empty;
+ 
+   *end = NUL;
+   empty = empty_pattern(p);
+   *end = c;
+   if (empty)
+   return FALSE;
+ }
+ 
+ // found a non-empty pattern or //
  *skiplen = (int)(p - ccline.cmdbuff);
  *patlen = (int)(end - p);
  
***
*** 556,572 
  else
end_pos = curwin->w_cursor; // shutup gcc 4
  
- // Disable 'hlsearch' highlighting if the pattern matches everything.
- // Avoids a flash when typing "foo\|".
- if (!use_last_pat)
- {
-   next_char = ccline.cmdbuff[skiplen + patlen];
-   ccline.cmdbuff[skiplen + patlen] = NUL;
-   if (empty_pattern(ccline.cmdbuff))
-   set_no_hlsearch(TRUE);
-   ccline.cmdbuff[skiplen + patlen] = next_char;
- }
- 
  validate_cursor();
  // May redraw the status line to show the cursor position.
  if (p_ru && curwin->w_status_height > 0)
--- 572,577 
*** ../vim-8.1.0319/src/testdir/test_search.vim 2018-08-18 21:04:57.743864534 
+0200
--- src/testdir/test_search.vim 2018-08-22 22:41:42.689971619 +0200
***
*** 913,918 
--- 913,926 
call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {})
call term_sendkeys(buf, "\")
  
+   " Only \v handled as empty pattern, does not move cursor
+   call term_sendkeys(buf, '3G4G')
+   call term_sendkeys(buf, ":nohlsearch\")
+   call term_sendkeys(buf, ':6,7s/\v')
+   sleep 100m
+   call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {})
+   call term_sendkeys(buf, "\")
+ 
call StopVimInTerminal(buf)
call delete('Xis_subst_script')
  endfunc
*** ../vim-8.1.0319/src/testdir/dumps/Test_incsearch_substitute_09.dump 
2018-08-22 23:02:14.943209354 +0200
--- src/testdir/dumps/Test_incsearch_substitute_09.dump 2018-08-22 
22:41:52.269923211 +0200
***
*** 0 
--- 1,9 
+ 

Re: [vim/vim] Proposal: Store the script line number (#3362)

2018-08-22 Fir de Conversatie Bram Moolenaar


Ozaki Kiichi wrote:

> This pull-req proposes storing the script line number with script ID.
> 
> ## Purpose
> 
> 1. Get the current script line number in any position.
> 
> We can get the script line number (by `expand('')`), but this returns 
> lnum based on the top of current function, except while doing `:source`.
> This patch adds new key `` to `expand()`, `expand('')` shows 
> the current line number.
> 
> 2. Get the line number:
> 
> * where option is set
> * where function/map/command/autocmd is defined
> 
> Vim saves the script ID for each items, but no line number.
> This patch can provide more details, the line number information, to user.
> 
> ## Details
> 
> Replacing "scriptID" field of each struct by `sctx_T` (means Script ConTeXt) :
> 
> ```c
> typedef struct {
> scid_Tsc_scid; // script ID
> linenr_T  sc_lnum; // script line number
> } sctx_T;
> ```
> 
> And add `current_sctx` to save the current context:
> 
> * Redefine `current_SID` as the macro of `current_sctx.sc_scid`
> * Define `current_SLN` as the macro of `current_sctx.sc_lnum`
> 
> Thus, by loading `sc_lnum` of context item into `current_SLN`, `current_SLN + 
> sourcing_lnum` means the current script line number. `expand('')` 
> returns it.
> 
> ## Application examples
> 
> ### Better profiling
> 
> By @blueyed.
> #3286 
> https://github.com/blueyed/vim/commit/6f9e14aa2e61cb271d654331dc1e11eee4dabd09
>  
> 
> ### Detailed information for items
> 
> By @ujihisa.
> 
> * Make `:verbose ...` show the line number
> 
> ```diff
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -8742,6 +8742,13 @@ last_set_msg(sctx_T sctx)
> MSG_PUTS(_("\n\tLast set from "));
> MSG_PUTS(p);
> vim_free(p);
> +   if (sctx.sc_lnum > 0)
> +   {
> +   char_u s[21];
> +
> +   vim_snprintf((char *)s, sizeof(s), ":%ld", sctx.sc_lnum);
> +   MSG_PUTS(s);
> +   }
> verbose_leave();
> }
>  }
> ```
> 
> `vim --clean`
> 
> present:
> ```
> :verbose map
>Q gq
> Last set from /usr/local/share/vim/vim81/defaults.vim
> ```
> 
> patched:
> ```
> :verbose map
>Q gq
> Last set from /usr/local/share/vim/vim81/defaults.vim:69
> ```
> 
> **NOTE** No test and doc yet.

Thanks for doing this.  Generally looks good.

Using sctx_T looks OK, but changing "script_ID" to "sctx" is a bit
cryptic.  How about using "script_ctx"?

-- 
|

Ceci n'est pas une pipe.

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

2018-08-22 Fir de Conversatie Bram Moolenaar


Patch 8.1.0319
Problem:bzero() function prototype doesn't work for Android.
Solution:   Add an #ifdef. (Elliott Hughes, closes #3365)
Files:  src/osdef1.h.in


*** ../vim-8.1.0318/src/osdef1.h.in 2016-12-01 17:08:35.0 +0100
--- src/osdef1.h.in 2018-08-22 21:54:20.04176 +0200
***
*** 65,72 
  #  endif
  # endif
  #endif
! /* used inside of FD_ZERO macro: */
  extern void   bzero(void *, size_t);
  #ifdef HAVE_SETSID
  extern pid_t  setsid(void);
  #endif
--- 65,74 
  #  endif
  # endif
  #endif
! #ifndef __BIONIC__  // Android's libc #defines bzero to memset.
! // used inside of FD_ZERO macro
  extern void   bzero(void *, size_t);
+ #endif
  #ifdef HAVE_SETSID
  extern pid_t  setsid(void);
  #endif
*** ../vim-8.1.0318/src/version.c   2018-08-22 20:16:11.985125882 +0200
--- src/version.c   2018-08-22 21:56:23.076075393 +0200
***
*** 796,797 
--- 796,799 
  {   /* Add new patch number below this line */
+ /**/
+ 319,
  /**/

-- 
Westheimer's Discovery:
A couple of months in the laboratory can
frequently save a couple of hours in the library.

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

2018-08-22 Fir de Conversatie Bram Moolenaar


Patch 8.1.0318
Problem:The getftype() test may fail for char devices if the file
disappeared in between the listing and the getftype() call.
Solution:   Ignore empty result. (Ozaki Kiichi, closes #3360)
Files:  src/testdir/test_stat.vim


*** ../vim-8.1.0317/src/testdir/test_stat.vim   2018-08-09 22:08:53.017560100 
+0200
--- src/testdir/test_stat.vim   2018-08-22 20:14:37.597732518 +0200
***
*** 141,157 
endif
  
for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
! call assert_equal('cdev', getftype(cdevfile))
endfor
  
for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
! call assert_equal('bdev', getftype(bdevfile))
endfor
  
" The /run/ directory typically contains socket files.
" If it does not, test won't fail but will not test socket files.
for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
! call assert_equal('socket', getftype(socketfile))
endfor
  
" TODO: file type 'other' is not tested. How can we test it?
--- 141,169 
endif
  
for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
! let type = getftype(cdevfile)
! " ignore empty result, can happen if the file disappeared
! if type != ''
!   call assert_equal('cdev', type)
! endif
endfor
  
for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
! let type = getftype(bdevfile)
! " ignore empty result, can happen if the file disappeared
! if type != ''
!   call assert_equal('bdev', type)
! endif
endfor
  
" The /run/ directory typically contains socket files.
" If it does not, test won't fail but will not test socket files.
for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
! let type = getftype(socketfile)
! " ignore empty result, can happen if the file disappeared
! if type != ''
!   call assert_equal('socket', type)
! endif
endfor
  
" TODO: file type 'other' is not tested. How can we test it?
*** ../vim-8.1.0317/src/version.c   2018-08-22 20:06:22.829022787 +0200
--- src/version.c   2018-08-22 20:11:52.166808526 +0200
***
*** 796,797 
--- 796,799 
  {   /* Add new patch number below this line */
+ /**/
+ 318,
  /**/

-- 
BLACK KNIGHT: The Black Knight always triumphs. Have at you!
   ARTHUR takes his last leg off.  The BLACK KNIGHT's body lands upright.
BLACK KNIGHT: All right, we'll call it a draw.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

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

2018-08-22 Fir de Conversatie Bram Moolenaar


Patch 8.1.0317
Problem:Cscope test fails when using shadow directory.
Solution:   Resolve symlink in Vim. (James McCoy, closes #3364)
Files:  src/testdir/test_cscope.vim


*** ../vim-8.1.0316/src/testdir/test_cscope.vim 2018-07-15 17:36:28.825442123 
+0200
--- src/testdir/test_cscope.vim 2018-08-22 20:04:27.869744792 +0200
***
*** 259,265 
  " Test ":cs add {dir}"  (add the {dir}/cscope.out database)
  func Test_cscope_add_dir()
call mkdir('Xcscopedir', 'p')
!   call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c')
cs add Xcscopedir
let a = execute('cscope show')
let lines = split(a, "\n", 1)
--- 259,270 
  " Test ":cs add {dir}"  (add the {dir}/cscope.out database)
  func Test_cscope_add_dir()
call mkdir('Xcscopedir', 'p')
! 
!   " Cscope doesn't handle symlinks, so this needs to be resolved in case a
!   " shadow directory is being used.
!   let memfile = resolve('../memfile_test.c')
!   call system('cscope -bk -fXcscopedir/cscope.out ' . memfile)
! 
cs add Xcscopedir
let a = execute('cscope show')
let lines = split(a, "\n", 1)
*** ../vim-8.1.0316/src/version.c   2018-08-22 11:27:57.118946770 +0200
--- src/version.c   2018-08-22 20:05:19.677430359 +0200
***
*** 796,797 
--- 796,799 
  {   /* Add new patch number below this line */
+ /**/
+ 317,
  /**/

-- 
Eye have a spelling checker, it came with my PC;
It plainly marks four my revue mistakes I cannot sea.
I've run this poem threw it, I'm sure your please to no,
It's letter perfect in it's weigh, my checker tolled me sew!

 /// 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: Test failure on arch ppc

2018-08-22 Fir de Conversatie Elimar Riesebieter
* James McCoy  [2018-08-22 07:36 -0400]:

> On Wed, Aug 22, 2018 at 08:10:10AM +0200, Elimar Riesebieter wrote:
> > * James McCoy  [2018-08-21 22:20 -0400]:
> > 
> > > On Wed, Aug 22, 2018 at 03:12:34AM +0200, Elimar Riesebieter wrote:
> > > > Hi all,
> > > > 
> > > > compiling vim 8.1.0315 on arch powerpc gives the following failure:
> > > > 
> > > > From test_cscope.vim:
> > > > Found errors in Test_cscope_add_dir():
> > > > Caught exception in Test_cscope_add_dir(): Vim(cscope):E563: 
> > > > stat(/source/vim/vim-8.1.0315/src/vim-basic/testdir/Xcscopedir/cscope.out)
> > > >  error: 2 @ function RunTheTest[40]..Test_cscope_add_dir, line 3
> > > 
> > > It looks like you're building in a shadow directory.  cscope doesn't
> > > follow symlinks, so the test fails to build a database for
> > > ../memfile_test.c.
> > 
> > Yes, I am building in a shadow dir. But on arch amd64 the tests run
> > fine, though.
> 
> Are you sure you have cscope installed in the amd64 environment?  I just
> had this same failure on amd64, now that I've installed cscope for
> Debian's builds.

Well, installed cscope and ran in to the same failure on amd64.

Elimar
-- 
  We all know Linux is great... it does infinite loops in 5 seconds.
-Linus Torvalds

-- 
-- 
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: Test failure on arch i386

2018-08-22 Fir de Conversatie Elimar Riesebieter
* Bram Moolenaar  [2018-08-22 12:42 +0200]:

> 
> Elimar Riesebieter wrote:
> 
> > > Hi all,
> > > 
> > > compiling vim 8.1.0315 on arch i386 gives the following failure:
> > > 
> > > >From test_search.vim:
> > > Found errors in Test_incsearch_substitute_dump():
> > > function 
> > > RunTheTest[40]..Test_incsearch_substitute_dump[69]..VerifyScreenDump line 
> > > 14: See dump file difference: call 
> > > term_dumpdiff("Test_incsearch_substitute_07.dump.failed", 
> > > "dumps/Test_incsearch_substitute_07.dump")
> > 
> > 
> > The diff is as follows:
> > 
> > 
> > --- ./src/testdir/dumps/Test_incsearch_substitute_07.dump   2018-08-21 
> > 21:58:13.0 +0200
> > +++ ./src/vim-gtk3/testdir/Test_incsearch_substitute_07.dump.failed 
> > 2018-08-22 03:11:40.341265509 +0200
> > @@ -6,4 +6,4 @@
> >  |f|o@1| |9| @64
> >  |f|o@1| |1|0| @63
> >  |b+9&&|a|r| +8&&|1@1| @63
> > -|:+0&&|9|,|1@1|s|/|b|a|r> @59
> > +|:+0&&|9|,|1@1|s|/|b|a|r> @31| @1| @25
> 
> Now that is weird, it's the same number of spaces but encoded
> differently.  Looks like there is some attribute that's different but is
> not reflected in the screendump.  Can you do some debugging on this?
> It's hard for me, since I cannot reproduce it.

A second build in a tmux session ran fine. The first build was in a
detached tmux session. Maybe that was the reason of the failure?

Elimar
-- 
  You cannot propel yourself forward by
  patting yourself on the back.

-- 
-- 
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: Test failure on arch i386

2018-08-22 Fir de Conversatie Christian Brabandt


On Mi, 22 Aug 2018, Bram Moolenaar wrote:

> > --- ./src/testdir/dumps/Test_incsearch_substitute_07.dump   2018-08-21 
> > 21:58:13.0 +0200
> > +++ ./src/vim-gtk3/testdir/Test_incsearch_substitute_07.dump.failed 
> > 2018-08-22 03:11:40.341265509 +0200
> > @@ -6,4 +6,4 @@
> >  |f|o@1| |9| @64
> >  |f|o@1| |1|0| @63
> >  |b+9&&|a|r| +8&&|1@1| @63
> > -|:+0&&|9|,|1@1|s|/|b|a|r> @59
> > +|:+0&&|9|,|1@1|s|/|b|a|r> @31| @1| @25
> 
> Now that is weird, it's the same number of spaces but encoded
> differently.  Looks like there is some attribute that's different but is
> not reflected in the screendump.  Can you do some debugging on this?
> It's hard for me, since I cannot reproduce it.

Looks like a problem I have noticed in #2732
https://github.com/vim/vim/pull/2732#issuecomment-375704176
Look at the diff from the message right above it.

Never found out what the problem was.

Best,
Christian
-- 
Meßgewänder: Das Kostüm der Narren am Himmlischen Hof.
-- Ambrose Gwinnet Bierce (Des Teufels Wörterbuch)

-- 
-- 
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: Test failure on arch i386

2018-08-22 Fir de Conversatie Bram Moolenaar


Elimar Riesebieter wrote:

> > Hi all,
> > 
> > compiling vim 8.1.0315 on arch i386 gives the following failure:
> > 
> > >From test_search.vim:
> > Found errors in Test_incsearch_substitute_dump():
> > function 
> > RunTheTest[40]..Test_incsearch_substitute_dump[69]..VerifyScreenDump line 
> > 14: See dump file difference: call 
> > term_dumpdiff("Test_incsearch_substitute_07.dump.failed", 
> > "dumps/Test_incsearch_substitute_07.dump")
> 
> 
> The diff is as follows:
> 
> 
> --- ./src/testdir/dumps/Test_incsearch_substitute_07.dump   2018-08-21 
> 21:58:13.0 +0200
> +++ ./src/vim-gtk3/testdir/Test_incsearch_substitute_07.dump.failed 
> 2018-08-22 03:11:40.341265509 +0200
> @@ -6,4 +6,4 @@
>  |f|o@1| |9| @64
>  |f|o@1| |1|0| @63
>  |b+9&&|a|r| +8&&|1@1| @63
> -|:+0&&|9|,|1@1|s|/|b|a|r> @59
> +|:+0&&|9|,|1@1|s|/|b|a|r> @31| @1| @25

Now that is weird, it's the same number of spaces but encoded
differently.  Looks like there is some attribute that's different but is
not reflected in the screendump.  Can you do some debugging on this?
It's hard for me, since I cannot reproduce it.

-- 
Mrs Abbott: I'm a paediatrician.
 Basil: Feet?
Mrs Abbott: Children.
 Sybil: Oh, Basil!
 Basil: Well, children have feet, don't they? That's how they move
around, my dear. You must take a look next time, it's most
interesting.   (Fawlty Towers)

 /// 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: [vim/vim] colorschemes under $HOME/vimfiles/pack/*/opt/colors/ aren't added to menu in gvim (#3359)

2018-08-22 Fir de Conversatie Bram Moolenaar


> > Tab completion for :colorscheme shows them, but the set colorscheme
> > menu only appears to show themes under $HOME/vimfiles/colors (and the
> > default ones)
> 
> Does this patch fix it:
> 
> --- /vim/git/runtime/menu.vim   2018-07-23 05:09:05.597235618 +0200
> +++ ../runtime/menu.vim 2018-08-21 22:04:01.845987971 +0200
> @@ -356,6 +356,8 @@
>let s:did_setup_color_schemes = 1
>  
>let n = globpath(, "colors/*.vim", 1, 1)
> +  let n .= globpath(, "pack/*/start/*/colors/*.vim", 1, 1)
> +  let n .= globpath(, "pack/*/opt/*/colors/*.vim", 1, 1)
>  
>" Ignore case for VMS and windows, sort on name
>let names = sort(map(n, 'substitute(v:val, 
> "\\c.*[/:\\]]\\([^/:]*\\)\\.vim", "\\1", "")'), 1)

But use "+=" instead of ".=" (it's a list, not a string).

The reason I didn't notice right away is that this is done lazyly, the
error only happens a bit later.  That also means it should not slow down
Vim too much.

-- 
Any resemblance between the above views and those of my employer, my terminal,
or the view out my window are purely coincidental.  Any resemblance between
the above and my own views is non-deterministic.  The question of the
existence of views in the absence of anyone to hold them is left as an
exercise for the reader.  The question of the existence of the reader is left
as an exercise for the second god coefficient.  (A discussion of
non-orthogonal, non-integral polytheism is beyond the scope of this article.)
(Ralph Jennings)

 /// 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: Test failure on arch ppc

2018-08-22 Fir de Conversatie Bram Moolenaar


James McCoy wrote:

> On Wed, Aug 22, 2018 at 03:12:34AM +0200, Elimar Riesebieter wrote:
> > Hi all,
> > 
> > compiling vim 8.1.0315 on arch powerpc gives the following failure:
> > 
> > From test_cscope.vim:
> > Found errors in Test_cscope_add_dir():
> > Caught exception in Test_cscope_add_dir(): Vim(cscope):E563: 
> > stat(/source/vim/vim-8.1.0315/src/vim-basic/testdir/Xcscopedir/cscope.out) 
> > error: 2 @ function RunTheTest[40]..Test_cscope_add_dir, line 3
> 
> It looks like you're building in a shadow directory.  cscope doesn't
> follow symlinks, so the test fails to build a database for
> ../memfile_test.c.

But it works with a shadow directory on other platforms.
Thus it still looks like it's specific for cscope on arch ppc.
Might be a cscope problem.

-- 
BLACK KNIGHT: I'm invincible!
ARTHUR:   You're a looney.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
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] Fix Test_swapinfo (#3361)

2018-08-22 Fir de Conversatie Bram Moolenaar


Ozaki Kiichi wrote:

> ## Problem
> 
> `Test_swapinfo()` fails in CI.
> 
> 8.1.0315
> https://travis-ci.org/vim/vim/jobs/418866410
> 
> ```
> >From test_swap.vim:
> Found errors in Test_swapinfo():
> function RunTheTest[40]..Test_swapinfo line 9: Expected 
> 'travis-job-vim-vim-418866410.travisci.net' but got 
> 'travis-job-vim-vim-418866410.travisci.n'
> ```
> 
> ## Cause
> 
> The hostname of Travis-CI Ubuntu worker is 
> "travis-job-vim-vim-418866410.travisci.net", this is 41 bytes, but `host` 
> (and also `user`) field of `swapinfo()` is truncated to at most 39 bytes.
> 
> https://github.com/vim/vim/blob/c631f2df624954184509df49479d52ad7fe5233b/src/memline.c#L136-L137
> 
> ## Solution
> 
> * Truncate the expected value (`hostname()`) to 39bytes
> * Add the notation to document

Thanks.  Travis was completely broken yesterday, thus I didn't notice.

-- 
ARTHUR:   You are indeed brave Sir knight, but the fight is mine.
BLACK KNIGHT: Had enough?
ARTHUR:   You stupid bastard.  You havn't got any arms left.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

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

2018-08-22 Fir de Conversatie Bram Moolenaar


Patch 8.1.0316
Problem:swapinfo() test fails on Travis.
Solution:   Handle a long host name. (Ozaki Kiichi, closes #3361)
Also make the version check flexible. (James McCoy)
Files:  src/testdir/test_swap.vim


*** ../vim-8.1.0315/src/testdir/test_swap.vim   2018-08-21 21:09:02.598739663 
+0200
--- src/testdir/test_swap.vim   2018-08-22 11:25:49.275645594 +0200
***
*** 105,113 
let fname = trim(execute('swapname'))
call assert_match('Xswapinfo', fname)
let info = swapinfo(fname)
!   call assert_match('8\.', info.version)
call assert_match('\w', info.user)
!   call assert_equal(hostname(), info.host)
call assert_match('Xswapinfo', info.fname)
call assert_match(0, info.dirty)
call assert_equal(getpid(), info.pid)
--- 105,117 
let fname = trim(execute('swapname'))
call assert_match('Xswapinfo', fname)
let info = swapinfo(fname)
! 
!   let ver = printf('VIM %d.%d', v:version / 100, v:version % 100)
!   call assert_equal(ver, info.version)
! 
call assert_match('\w', info.user)
!   " host name is truncated to 39 bytes in the swap file
!   call assert_equal(hostname()[:38], info.host)
call assert_match('Xswapinfo', info.fname)
call assert_match(0, info.dirty)
call assert_equal(getpid(), info.pid)
*** ../vim-8.1.0315/src/version.c   2018-08-21 21:58:09.528674683 +0200
--- src/version.c   2018-08-22 11:23:44.476323657 +0200
***
*** 796,797 
--- 796,799 
  {   /* Add new patch number below this line */
+ /**/
+ 316,
  /**/

-- 
ARTHUR: What are you going to do. bleed on me?
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
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: Test failure on arch ppc

2018-08-22 Fir de Conversatie Elimar Riesebieter
* James McCoy  [2018-08-21 22:20 -0400]:

> On Wed, Aug 22, 2018 at 03:12:34AM +0200, Elimar Riesebieter wrote:
> > Hi all,
> > 
> > compiling vim 8.1.0315 on arch powerpc gives the following failure:
> > 
> > From test_cscope.vim:
> > Found errors in Test_cscope_add_dir():
> > Caught exception in Test_cscope_add_dir(): Vim(cscope):E563: 
> > stat(/source/vim/vim-8.1.0315/src/vim-basic/testdir/Xcscopedir/cscope.out) 
> > error: 2 @ function RunTheTest[40]..Test_cscope_add_dir, line 3
> 
> It looks like you're building in a shadow directory.  cscope doesn't
> follow symlinks, so the test fails to build a database for
> ../memfile_test.c.

Yes, I am building in a shadow dir. But on arch amd64 the tests run
fine, though.

Elimar
-- 
  The path to source is always uphill!
-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: Test failure on arch ppc

2018-08-22 Fir de Conversatie Christian Brabandt


On Di, 21 Aug 2018, James McCoy wrote:

> On Wed, Aug 22, 2018 at 03:12:34AM +0200, Elimar Riesebieter wrote:
> > Hi all,
> > 
> > compiling vim 8.1.0315 on arch powerpc gives the following failure:
> > 
> > From test_cscope.vim:
> > Found errors in Test_cscope_add_dir():
> > Caught exception in Test_cscope_add_dir(): Vim(cscope):E563: 
> > stat(/source/vim/vim-8.1.0315/src/vim-basic/testdir/Xcscopedir/cscope.out) 
> > error: 2 @ function RunTheTest[40]..Test_cscope_add_dir, line 3
> 
> It looks like you're building in a shadow directory.  cscope doesn't
> follow symlinks, so the test fails to build a database for
> ../memfile_test.c.

I wonder why this did not occur earlier.

What is the symbolic link? We should be able to resolve the symbolic 
link in the test before calling cscope.

Best,
Christian
-- 
Einfachheit ist das Resultat der Reife.
-- Friedrich Johann Christoph Schiller

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