Patch 8.0.1067

2017-09-06 Fir de Conversatie Bram Moolenaar

Patch 8.0.1067
Problem:Using try/catch in timer does not prevent it from being stopped.
Solution:   Reset the exception context and use did_emsg instead of
called_emsg.
Files:  src/ex_cmds2.c, src/testdir/test_timers.vim, src/globals.h,
src/message.c


*** ../vim-8.0.1066/src/ex_cmds2.c  2017-08-26 23:43:23.974903370 +0200
--- src/ex_cmds2.c  2017-09-06 23:39:00.181795178 +0200
***
*** 1219,1248 
{
int save_timer_busy = timer_busy;
int save_vgetc_busy = vgetc_busy;
!   int did_emsg_save = did_emsg;
!   int called_emsg_save = called_emsg;
!   int did_throw_save = did_throw;
int save_must_redraw = must_redraw;
  
timer_busy = timer_busy > 0 || vgetc_busy > 0;
vgetc_busy = 0;
called_emsg = FALSE;
must_redraw = 0;
timer->tr_firing = TRUE;
timer_callback(timer);
timer->tr_firing = FALSE;
timer_next = timer->tr_next;
did_one = TRUE;
timer_busy = save_timer_busy;
vgetc_busy = save_vgetc_busy;
!   if (called_emsg)
!   {
++timer->tr_emsg_count;
!   if (!did_throw_save && did_throw && current_exception != NULL)
!   discard_current_exception();
!   }
!   did_emsg = did_emsg_save;
!   called_emsg = called_emsg_save;
if (must_redraw != 0)
need_update_screen = TRUE;
must_redraw = must_redraw > save_must_redraw
--- 1219,1258 
{
int save_timer_busy = timer_busy;
int save_vgetc_busy = vgetc_busy;
!   int save_did_emsg = did_emsg;
!   int save_called_emsg = called_emsg;
int save_must_redraw = must_redraw;
+   int save_trylevel = trylevel;
+   int save_did_throw = did_throw;
+   except_T *save_current_exception = current_exception;
  
+   /* Create a scope for running the timer callback, ignoring most of
+* the current scope, such as being inside a try/catch. */
timer_busy = timer_busy > 0 || vgetc_busy > 0;
vgetc_busy = 0;
called_emsg = FALSE;
+   did_emsg = FALSE;
+   did_uncaught_emsg = FALSE;
must_redraw = 0;
+   trylevel = 0;
+   did_throw = FALSE;
+   current_exception = NULL;
+ 
timer->tr_firing = TRUE;
timer_callback(timer);
timer->tr_firing = FALSE;
+ 
timer_next = timer->tr_next;
did_one = TRUE;
timer_busy = save_timer_busy;
vgetc_busy = save_vgetc_busy;
!   if (did_uncaught_emsg)
++timer->tr_emsg_count;
!   did_emsg = save_did_emsg;
!   called_emsg = save_called_emsg;
!   trylevel = save_trylevel;
!   did_throw = save_did_throw;
!   current_exception = save_current_exception;
if (must_redraw != 0)
need_update_screen = TRUE;
must_redraw = must_redraw > save_must_redraw
*** ../vim-8.0.1066/src/testdir/test_timers.vim 2017-09-04 22:55:57.923034277 
+0200
--- src/testdir/test_timers.vim 2017-09-06 22:50:08.589057934 +0200
***
*** 208,213 
--- 208,231 
call assert_equal(3, g:call_count)
  endfunc
  
+ func FuncWithCaughtError(timer)
+   let g:call_count += 1
+   try
+ doesnotexist
+   catch
+ " nop
+   endtry
+ endfunc
+ 
+ func Test_timer_catch_error()
+   let g:call_count = 0
+   let timer = timer_start(10, 'FuncWithCaughtError', {'repeat': 4})
+   " Timer will not be stopped.
+   call WaitFor('g:call_count == 4')
+   sleep 50m
+   call assert_equal(4, g:call_count)
+ endfunc
+ 
  func FeedAndPeek(timer)
call test_feedinput('a')
call getchar(1)
*** ../vim-8.0.1066/src/globals.h   2017-08-17 16:55:08.629414811 +0200
--- src/globals.h   2017-09-06 23:39:54.425439077 +0200
***
*** 182,187 
--- 182,191 
  #endif
  EXTERN intdid_emsg;   /* set by emsg() when the message
   is displayed or thrown */
+ #ifdef FEAT_EVAL
+ EXTERN intdid_uncaught_emsg;  /* emsg() was called and did not
+  cause an exception */
+ #endif
  EXTERN intdid_emsg_syntax;/* did_emsg set because of a
   syntax error */
  EXTERN intcalled_emsg;/* always set by emsg() */
*** ../vim-8.0.1066/src/message.c   2017-08-17 20:31:44.001203501 +0200
--- src/message.c   2017-09-06 23:39:09.081736747 +0200
***
*** 609,619 
  
  called_emsg = TRUE;
  
- /*
-  * If "emsg_severe" is TRUE: When an error exception is to be thrown,
-  * prefer this message over previous messages for the same command.
-  */
  

Re: Test failure on linux ppc

2017-09-06 Fir de Conversatie Christian Brabandt

On Mi, 06 Sep 2017, Elimar Riesebieter wrote:

> * Elimar Riesebieter  [2017-09-06 15:58 +0200]:
> 
> > Running tests on linux ppc I get:
> > 
> > >From test_alot.vim:¬
> >   Found errors in Test_filetype_detection():¬
> >   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> > with file name: /.config/git/config: Expected 'gitconfig' but got ''¬
> >   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> > with file name: /.config/upstart/file.conf: Expected 'upstart' but got ''¬
> >   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> > with file name: /.config/upstart/file.override: Expected 'upstart' but got 
> > ''¬
> >   TEST FAILURE¬
> > 
> > Build on amd64 just runs fine, though.
> 
> This is with 8.0.1064

Did this work with a previous version? If you run the ppc compiled vim 
and do :e /.config/git/config  what is the filetype (:set filetype?)
What for the other upstart paths? You probably need a :filetype on

Best,
Christian
-- 
Den berühmten Mann freuet kein anderes Lob weiter als ein größeres.
-- Jean Paul

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

2017-09-06 Fir de Conversatie Bram Moolenaar

Patch 8.0.1066
Problem:Some terminals can't handle requesting cursor mode. (Steven
Hartland)
Solution:   Recognize vandyke SecureCRT. (closes #2008)
Files:  src/term.c


*** ../vim-8.0.1065/src/term.c  2017-09-05 21:57:23.353623522 +0200
--- src/term.c  2017-09-06 22:05:25.130715652 +0200
***
*** 4580,4588 
if (col >= 2500)
is_not_xterm = TRUE;
  
!   /* PuTTY sends 0;136;0 */
if (version == 136
!   && STRNCMP(tp + extra - 2, "0;136;0c", 8) == 0)
is_not_xterm = TRUE;
  
/* Konsole sends 0;115;0 */
--- 4580,4589 
if (col >= 2500)
is_not_xterm = TRUE;
  
!   /* PuTTY sends 0;136;0
!* vandyke SecureCRT sends 1;136;0 */
if (version == 136
!   && STRNCMP(tp + extra - 3, ";136;0c", 8) == 0)
is_not_xterm = TRUE;
  
/* Konsole sends 0;115;0 */
*** ../vim-8.0.1065/src/version.c   2017-09-06 21:43:06.379486821 +0200
--- src/version.c   2017-09-06 22:06:44.138200364 +0200
***
*** 771,772 
--- 771,774 
  {   /* Add new patch number below this line */
+ /**/
+ 1066,
  /**/

-- 
>From "know your smileys":
 :~)A man with a tape recorder up his nose

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

2017-09-06 Fir de Conversatie Bram Moolenaar

Elimar Riesebieter wrote:

> Running tests on linux ppc I get:
> 
> From test_alot.vim:¬
>   Found errors in Test_filetype_detection():¬
>   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> with file name: /.config/git/config: Expected 'gitconfig' but got ''¬
>   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> with file name: /.config/upstart/file.conf: Expected 'upstart' but got ''¬
>   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> with file name: /.config/upstart/file.override: Expected 'upstart' but got ''¬
>   TEST FAILURE¬
> 
> Build on amd64 just runs fine, though.

It works fine for most users.  What is special about this system?
The common part seems to be the ".config" directory.

-- 
>From "know your smileys":
 y:-)   Bad toupee

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

2017-09-06 Fir de Conversatie Bram Moolenaar

Patch 8.0.1065
Problem:Not all macro examples are included in the self-installing
executable. (lkintact)
Solution:   Add the directories to the NSIS script. (closes #2065)
Files:  nsis/gvim.nsi


*** ../vim-8.0.1064/nsis/gvim.nsi   2017-08-19 13:29:13.56331 +0200
--- nsis/gvim.nsi   2017-09-06 21:40:19.488582098 +0200
***
*** 219,224 
--- 219,232 
  
SetOutPath $0\macros
File ${VIMRT}\macros\*.*
+   SetOutPath $0\macros\hanoi
+   File ${VIMRT}\macros\hanoi\*.*
+   SetOutPath $0\macros\life
+   File ${VIMRT}\macros\life\*.*
+   SetOutPath $0\macros\maze
+   File ${VIMRT}\macros\maze\*.*
+   SetOutPath $0\macros\urm
+   File ${VIMRT}\macros\urm\*.*
  
SetOutPath $0\pack\dist\opt\dvorak\dvorak
File ${VIMRT}\pack\dist\opt\dvorak\dvorak\*.*
*** ../vim-8.0.1064/src/version.c   2017-09-05 23:32:33.595883323 +0200
--- src/version.c   2017-09-06 21:42:30.527722055 +0200
***
*** 771,772 
--- 771,774 
  {   /* Add new patch number below this line */
+ /**/
+ 1065,
  /**/

-- 
>From "know your smileys":
 ;-0Can't find shift key
 ,-9Kann Umschalttaste nicht finden

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

2017-09-06 Fir de Conversatie Elimar Riesebieter
* Elimar Riesebieter  [2017-09-06 15:58 +0200]:

> Running tests on linux ppc I get:
> 
> >From test_alot.vim:¬
>   Found errors in Test_filetype_detection():¬
>   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> with file name: /.config/git/config: Expected 'gitconfig' but got ''¬
>   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> with file name: /.config/upstart/file.conf: Expected 'upstart' but got ''¬
>   function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: 
> with file name: /.config/upstart/file.override: Expected 'upstart' but got ''¬
>   TEST FAILURE¬
> 
> Build on amd64 just runs fine, though.

This is with 8.0.1064

Elimar
-- 
  Alles, was viel bedacht wird, wird bedenklich!;-)
 Friedrich Nietzsche

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


Test failure on linux ppc

2017-09-06 Fir de Conversatie Elimar Riesebieter
Running tests on linux ppc I get:

>From test_alot.vim:¬
  Found errors in Test_filetype_detection():¬
  function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: with 
file name: /.config/git/config: Expected 'gitconfig' but got ''¬
  function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: with 
file name: /.config/upstart/file.conf: Expected 'upstart' but got ''¬
  function RunTheTest[24]..Test_filetype_detection[2]..CheckItems line 9: with 
file name: /.config/upstart/file.override: Expected 'upstart' but got ''¬
  TEST FAILURE¬

Build on amd64 just runs fine, though.

Elimar
-- 
  >what IMHO then?
  IMHO - Inhalation of a Multi-leafed Herbal Opiate ;)
  --posting from alex in debian-user--

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