Patch 8.2.0752

2020-05-13 Fir de Conversatie Bram Moolenaar


Patch 8.2.0752
Problem:Terminal in popup window test is a bit flaky.
Solution:   Wait for shell job status to be "run".  Mark as flaky test.
Files:  src/testdir/test_popupwin.vim


*** ../vim-8.2.0751/src/testdir/test_popupwin.vim   2020-05-13 
16:34:10.401723784 +0200
--- src/testdir/test_popupwin.vim   2020-05-13 23:12:50.224305144 +0200
***
*** 2422,2433 
  func Test_popupwin_terminal_buffer()
CheckFeature terminal
CheckUnix
  
let origwin = win_getid()
let ptybuf = term_start(, #{hidden: 1})
let winid = popup_create(ptybuf, #{minwidth: 40, minheight: 10})
" Wait for shell to start
!   sleep 200m
" Check this doesn't crash
call assert_equal(winnr(), winnr('j'))
call assert_equal(winnr(), winnr('k'))
--- 2422,2436 
  func Test_popupwin_terminal_buffer()
CheckFeature terminal
CheckUnix
+   " Starting a terminal to run a shell in is considered flaky.
+   let g:test_is_flaky = 1
  
let origwin = win_getid()
let ptybuf = term_start(, #{hidden: 1})
let winid = popup_create(ptybuf, #{minwidth: 40, minheight: 10})
" Wait for shell to start
!   call WaitForAssert({-> assert_equal("run", 
job_status(term_getjob(ptybuf)))})
!   sleep 100m
" Check this doesn't crash
call assert_equal(winnr(), winnr('j'))
call assert_equal(winnr(), winnr('k'))
*** ../vim-8.2.0751/src/version.c   2020-05-13 23:21:23.522438317 +0200
--- src/version.c   2020-05-13 23:16:22.831516868 +0200
***
*** 748,749 
--- 748,751 
  {   /* Add new patch number below this line */
+ /**/
+ 752,
  /**/

-- 
>From "know your smileys":
 :.-(   Crying

 /// 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005132125.04DLP0Fc010626%40masaka.moolenaar.net.


Re: Patch 8.2.0751

2020-05-13 Fir de Conversatie Bram Moolenaar


I wrote:

> Patch 8.2.0751
> Problem:Vim9: performance can be improved.
> Solution:   Don't call break.  Inline check for list materialize.  Make an
> inline version of ga_grow().
> Files:  src/vim9execute.vim, src/macros.h, src/evalfunc.c, src/misc2.c,
> src/proto/misc2.pro, src/channel.c, src/eval.c, src/evalbuffer.c,
> src/evalvars.c, src/filepath.c, src/highlight.c, src/insexpand.c,
> src/json.c, src/list.c, src/popupmenu.c, src/popupwin.c,
> src/userfunc.c, src/if_py_both.h

Somehow the change to version.c was missing:

*** ../vim-8.2.0750/src/version.c   2020-05-13 16:34:10.401723784 +0200
--- src/version.c   2020-05-13 16:53:31.202280571 +0200
***
*** 748,749 
--- 748,751 
  {   /* Add new patch number below this line */
+ /**/
+ 751,
  /**/

-- 
>From "know your smileys":
 :-| :-|   Deja' vu!

 /// 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005132125.04DLP05b010632%40masaka.moolenaar.net.


Re: Patch 8.2.0751

2020-05-13 Fir de Conversatie John Marriott



On 14-May-2020 06:44, Bram Moolenaar wrote:

Patch 8.2.0751
Problem:Vim9: performance can be improved.
Solution:   Don't call break.  Inline check for list materialize.  Make an
 inline version of ga_grow().
Files:  src/vim9execute.vim, src/macros.h, src/evalfunc.c, src/misc2.c,
 src/proto/misc2.pro, src/channel.c, src/eval.c, src/evalbuffer.c,
 src/evalvars.c, src/filepath.c, src/highlight.c, src/insexpand.c,
 src/json.c, src/list.c, src/popupmenu.c, src/popupwin.c,
 src/userfunc.c, src/if_py_both.h



Hi Bram,

version.c was not updated as part of this commit.

Cheers
John

--
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/fdc2dcc8-a3af-3cfd-8a3e-d624a5f861ae%40internode.on.net.


Re: Since recent commit getting E863: Not allowed for a terminal in a popup window

2020-05-13 Fir de Conversatie Bram Moolenaar


> I think this is:
> 
>   let fzf.buf = term_start([, , command], {'curwin': 
> 1, 'exit_cb': function(fzf.on_exit)})
> 
> ... trying to see what is in fzf.on_exit that might matter ?

Please find out what the command is where the error is triggered.
The usage of a terminal in a popup window was made more strict to fix a
bug.  To see whether valid cases now run into this error we need to see
where exactly this happens.

-- 
>From "know your smileys":
 [:-)   Frankenstein's monster

 /// 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005132044.04DKixKo001961%40masaka.moolenaar.net.


Patch 8.2.0751

2020-05-13 Fir de Conversatie Bram Moolenaar


Patch 8.2.0751
Problem:Vim9: performance can be improved.
Solution:   Don't call break.  Inline check for list materialize.  Make an
inline version of ga_grow().
Files:  src/vim9execute.vim, src/macros.h, src/evalfunc.c, src/misc2.c,
src/proto/misc2.pro, src/channel.c, src/eval.c, src/evalbuffer.c,
src/evalvars.c, src/filepath.c, src/highlight.c, src/insexpand.c,
src/json.c, src/list.c, src/popupmenu.c, src/popupwin.c,
src/userfunc.c, src/if_py_both.h


diff: ../vim-8.2.0750/src/vim9execute.vim: No such file or directory
diff: src/vim9execute.vim: No such file or directory
*** ../vim-8.2.0750/src/macros.h2020-04-12 20:55:16.994819669 +0200
--- src/macros.h2020-05-13 22:30:25.756489771 +0200
***
*** 373,375 
--- 373,381 
  # define ESTACK_CHECK_NOW
  # define CHECK_CURBUF
  #endif
+ 
+ // Inline the condition for performance.
+ #define CHECK_LIST_MATERIALIZE(l) if ((l)->lv_first == _list_item) 
range_list_materialize(l)
+ 
+ // Inlined version of ga_grow().  Especially useful if "n" is a constant.
+ #define GA_GROW(gap, n) (((gap)->ga_maxlen - (gap)->ga_len < n) ? 
ga_grow_inner((gap), (n)) : OK)
*** ../vim-8.2.0750/src/evalfunc.c  2020-05-13 16:34:10.401723784 +0200
--- src/evalfunc.c  2020-05-13 21:27:41.096446633 +0200
***
*** 2275,2281 
  {
listitem_T  *item;
  
!   range_list_materialize(list);
item = list->lv_first;
do_cmdline(NULL, get_list_line, (void *),
  DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT|DOCMD_KEYTYPED);
--- 2275,2281 
  {
listitem_T  *item;
  
!   CHECK_LIST_MATERIALIZE(list);
item = list->lv_first;
do_cmdline(NULL, get_list_line, (void *),
  DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT|DOCMD_KEYTYPED);
***
*** 2820,2826 
copy_tv(_pt->pt_argv[i], >pt_argv[i]);
if (lv_len > 0)
{
!   range_list_materialize(list);
FOR_ALL_LIST_ITEMS(list, li)
copy_tv(>li_tv, >pt_argv[i++]);
}
--- 2820,2826 
copy_tv(_pt->pt_argv[i], >pt_argv[i]);
if (lv_len > 0)
{
!   CHECK_LIST_MATERIALIZE(list);
FOR_ALL_LIST_ITEMS(list, li)
copy_tv(>li_tv, >pt_argv[i++]);
}
***
*** 4912,4918 
  l = argvars[0].vval.v_list;
  if (l != NULL)
  {
!   range_list_materialize(l);
item = l->lv_first;
if (argvars[2].v_type != VAR_UNKNOWN)
{
--- 4912,4918 
  l = argvars[0].vval.v_list;
  if (l != NULL)
  {
!   CHECK_LIST_MATERIALIZE(l);
item = l->lv_first;
if (argvars[2].v_type != VAR_UNKNOWN)
{
***
*** 5018,5024 
  msg_clr_eos();
  
  l = argvars[0].vval.v_list;
! range_list_materialize(l);
  FOR_ALL_LIST_ITEMS(l, li)
  {
msg_puts((char *)tv_get_string(>li_tv));
--- 5018,5024 
  msg_clr_eos();
  
  l = argvars[0].vval.v_list;
! CHECK_LIST_MATERIALIZE(l);
  FOR_ALL_LIST_ITEMS(l, li)
  {
msg_puts((char *)tv_get_string(>li_tv));
***
*** 5494,5500 
  {
if ((l = argvars[0].vval.v_list) == NULL)
goto theend;
!   range_list_materialize(l);
li = l->lv_first;
  }
  else
--- 5494,5500 
  {
if ((l = argvars[0].vval.v_list) == NULL)
goto theend;
!   CHECK_LIST_MATERIALIZE(l);
li = l->lv_first;
  }
  else
***
*** 6279,6285 
list_T *list = rettv->vval.v_list;
  
// Create a non-materialized list.  This is much more efficient and
!   // works with ":for".  If used otherwise range_list_materialize() must
// be called.
list->lv_first = _list_item;
list->lv_u.nonmat.lv_start = start;
--- 6279,6285 
list_T *list = rettv->vval.v_list;
  
// Create a non-materialized list.  This is much more efficient and
!   // works with ":for".  If used otherwise CHECK_LIST_MATERIALIZE() must
// be called.
list->lv_first = _list_item;
list->lv_u.nonmat.lv_start = start;
***
*** 6290,6315 
  }
  
  /*
!  * If "list" is a non-materialized list then materialize it now.
   */
  void
  range_list_materialize(list_T *list)
  {
! if (list->lv_first == _list_item)
! {
!   varnumber_T start = list->lv_u.nonmat.lv_start;
!   varnumber_T end = list->lv_u.nonmat.lv_end;
!   int stride = list->lv_u.nonmat.lv_stride;
!   varnumber_T i;
! 
!   list->lv_first = NULL;
!   list->lv_u.mat.lv_last = NULL;
!   list->lv_len = 0;
!   list->lv_u.mat.lv_idx_item = NULL;
!   

Re: [vim/vim] can't close a popup terminal window when its buffer has been replaced by "term_start()" (#5744)

2020-05-13 Fir de Conversatie M Kelly
Hi,

I raised a similar question in another thread.

>> All the examples raise E863, probably because of 5aed0cc.

Exactly, I find fzf+popup now has an issue since this commit.
Do we need to change fzf.vim to get around this ?

thx,
-m

>

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/317c0c3d-9031-48a5-844b-68a98de51e39%40googlegroups.com.


Re: Since recent commit getting E863: Not allowed for a terminal in a popup window

2020-05-13 Fir de Conversatie M Kelly
Hi,

Should I open a github issue for this ?
Seems there is similar info recently from lacygoill but not sure that is 
fully resolved ?

thx,
-m

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/4fe34376-27d5-4398-b77b-8897de2bcfce%40googlegroups.com.


Re: Test failure building 8.2.0746

2020-05-13 Fir de Conversatie Yegappan Lakshmanan
Hi,

On Wed, May 13, 2020 at 4:09 AM Elimar Riesebieter 
wrote:

> * Elimar Riesebieter  [2020-05-13 12:09 +0200]:
>
> > Building 8.2.0746 on amd64 within a tmux-session gives the follwing test
> > failure:
> >
> > Failures:
> > From test_terminal.vim:
> > Found errors in Test_term_keycode_translation():
> > Run 1:
> > function RunTheTest[39]..Test_term_keycode_translation line 30:
> Expected ['', '', '', '', '', '', '', '',
> '', '', '', '', '', '', '',
> '', '', '', '', '', '', '',
> '', '', '', '', '', '',
> '', '', '0123456789', '\t\t.+-*/'] but got ['', '',
> '', '', '', '', '', '', '', '', '',
> '', '', '', '', '', '', '',
> '', '', '', '', '\t\t.+-*/', '',
> '', '', '', '', '', '',
> '', '45678012']
>
> Noticed this is https://github.com/vim/vim/issues/6070.
>
> I tried to run the test with different TERM (xterm,
> rxvt-unicode-256color, tmux-256color) settings but no success.
>
>
I am not able to reproduce this test failure in a tmux session running
on Ubuntu 19.10 inside a gnome-terminal. I tried running the test with
TERM set to xterm, screen and tmux-256color. In all the case, the
test passes.


> Kitty is not available here. But to be honest, we shouldn't need a
> special terminal emulator to run this test, though.
>
>
You don't need a special terminal emulator to run this test.

Regards,
Yegappan


> Elimar
>
>

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7kWOkx4590FUKq14cMsRWc0Kz-TT2ire7HpGtYjMSKLAA%40mail.gmail.com.


Re: Since recent commit getting E863: Not allowed for a terminal in a popup window

2020-05-13 Fir de Conversatie M Kelly
Hi,

I think this is:

  let fzf.buf = term_start([, , command], {'curwin': 
1, 'exit_cb': function(fzf.on_exit)})

... trying to see what is in fzf.on_exit that might matter ?

thx,
-m

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/616655cd-e501-4e23-985e-5bf0159fe522%40googlegroups.com.


Patch 8.2.0750

2020-05-13 Fir de Conversatie Bram Moolenaar


Patch 8.2.0750
Problem:Netbeans test is a bit flaky.
Solution:   Allow for standard sign to be defined.  Use WaitForAssert().
Files:  src/testdir/test_netbeans.vim


*** ../vim-8.2.0749/src/testdir/test_netbeans.vim   2020-04-19 
14:02:22.427687032 +0200
--- src/testdir/test_netbeans.vim   2020-05-13 17:13:53.598631385 +0200
***
*** 339,346 
let l = readfile('Xnetbeans')
call assert_equal('send: 2:defineAnnoType!60 1 "s1" "x" "=>" blue none', 
l[-1])
sleep 1m
!   call assert_equal([{'name': '1', 'texthl': 'NB_s1', 'text': '=>'}],
! \ sign_getdefined())
let g:last += 3
  
" defineAnnoType with a long color name
--- 339,346 
let l = readfile('Xnetbeans')
call assert_equal('send: 2:defineAnnoType!60 1 "s1" "x" "=>" blue none', 
l[-1])
sleep 1m
!   call assert_equal({'name': '1', 'texthl': 'NB_s1', 'text': '=>'},
! \ sign_getdefined()[0])
let g:last += 3
  
" defineAnnoType with a long color name
***
*** 610,619 
" detach
call appendbufline(cmdbufnr, '$', 'detach_Test')
call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 6)')
!   let l = readfile('Xnetbeans')
!   call assert_equal('0:disconnect=91', l[-1])
  
!   " close the connection
call assert_false(has("netbeans_enabled"))
  
call delete("Xnetbeans")
--- 610,618 
" detach
call appendbufline(cmdbufnr, '$', 'detach_Test')
call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 6)')
!   call WaitForAssert({-> assert_equal('0:disconnect=91', 
readfile("Xnetbeans")[-1])})
  
!   " the connection was closed
call assert_false(has("netbeans_enabled"))
  
call delete("Xnetbeans")
*** ../vim-8.2.0749/src/version.c   2020-05-13 16:53:43.514247289 +0200
--- src/version.c   2020-05-13 17:14:54.890440007 +0200
***
*** 748,749 
--- 748,751 
  {   /* Add new patch number below this line */
+ /**/
+ 750,
  /**/

-- 
I AM THANKFUL...
...for a lawn that needs mowing, windows that need cleaning
and gutters that need fixing because it means I have a home.

 /// 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005131516.04DFGV2E015566%40masaka.moolenaar.net.


Since recent commit getting E863: Not allowed for a terminal in a popup window

2020-05-13 Fir de Conversatie M Kelly
Hi,

Perhaps this was mentioned before ?

Since commit 5aed0ccb965dbad4b60f4c77c9c4455a9379e73c 
I am unable to use ag+fzf in a popup.  I get this error:

Error detected while processing function 
fzf#vim#grep[24]..86_fzf[18]..fzf#run[58]..66_execute_term:
line   70:
E863: Not allowed for a terminal in a popup window

before this commit it worked well.
I have the latest fzf and fzf.vim - do I need to submit a change to match 
latest vim api ?
Not sure yet what I need to change tho.

thx,
-m

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/89a68570-d0e1-43e7-a82e-ba0e1cc2b5a6%40googlegroups.com.


Re: Test failure building 8.2.0746

2020-05-13 Fir de Conversatie Bram Moolenaar


Elimar Riesebieter wrote:

> Building 8.2.0746 on amd64 within a tmux-session gives the follwing test
> failure:
> 
> Failures:
> From test_terminal.vim:
> Found errors in Test_term_keycode_translation():
> Run 1:
> function RunTheTest[39]..Test_term_keycode_translation line 30: 
> Expected ['', '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', 
> '0123456789', '\t\t.+-*/'] but got ['', '', '', '', '', 
> '', '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', 
> '', '', '\t\t.+-*/', '', '', '', 
> '', '', '', '', '', '45678012']

I still can't reproduce this problem, also when running in tmux.
Anything else that matters?

-- 
The primary purpose of the DATA statement is to give names to constants;
instead of referring to pi as 3.141592653589793 at every appearance, the
variable PI can be given that value with a DATA statement and used instead
of the longer form of the constant.  This also simplifies modifying the
program, should the value of pi change.
-- FORTRAN manual for Xerox Computers

 /// 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005131454.04DEskhK011157%40masaka.moolenaar.net.


Patch 8.2.0749

2020-05-13 Fir de Conversatie Bram Moolenaar


Patch 8.2.0749
Problem:TERM signal test fails on FreeBSD.
Solution:   Do not check the messages, the may appear anywhere. (Dominique
Pelle, closes #6075)
Files:  src/testdir/test_signals.vim


*** ../vim-8.2.0748/src/testdir/test_signals.vim2020-05-12 
14:41:58.875062794 +0200
--- src/testdir/test_signals.vim2020-05-13 16:52:13.494487305 +0200
***
*** 136,143 
  
call assert_false(filereadable('Xsig_TERM'))
exe 'silent !kill -s TERM '  .. pid_vim
-   call WaitForAssert({-> assert_equal('Vim: Caught deadly signal TERM', 
term_getline(buf, 1))})
-   call WaitForAssert({-> assert_match('Vim: preserving files\.\.\.$', 
term_getline(buf, 2))})
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
  
" Don't call StopVimInTerminal() as it expects job to be still running.
--- 136,141 
*** ../vim-8.2.0748/src/version.c   2020-05-13 16:34:10.401723784 +0200
--- src/version.c   2020-05-13 16:53:31.202280571 +0200
***
*** 748,749 
--- 748,751 
  {   /* Add new patch number below this line */
+ /**/
+ 749,
  /**/

-- 
Bare feet magnetize sharp metal objects so they point upward from the
floor -- especially in the dark.

 /// 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005131454.04DEskLm011166%40masaka.moolenaar.net.


Patch 8.2.0748

2020-05-13 Fir de Conversatie Bram Moolenaar


Patch 8.2.0748
Problem:Cannot get a list of all popups.
Solution:   Add popup_list().  Use it in the test runner.
Files:  runtime/doc/eval.txt, runtime/doc/popup.txt, src/popupwin.c,
src/proto/popupwin.pro, src/evalfunc.c,
src/testdir/test_popupwin.vim, src/testdir/runtest.vim


*** ../vim-8.2.0747/runtime/doc/eval.txt2020-04-26 15:59:51.202952140 
+0200
--- runtime/doc/eval.txt2020-05-13 16:10:15.738475735 +0200
***
*** 2623,2628 
--- 2627,2634 
  popup_getoptions({id})Dictget options of popup window {id}
  popup_getpos({id})Dictget position of popup window {id}
  popup_hide({id})  nonehide popup menu {id}
+ popup_list()  Listget a list of window IDs of al popups
+ popup_locate({row}, {col})Number  get window ID of popup at position
  popup_menu({what}, {options}) Number  create a popup window used as a menu
  popup_move({id}, {options})   noneset position of popup window {id}
  popup_notification({what}, {options})
*** ../vim-8.2.0747/runtime/doc/popup.txt   2020-05-13 13:40:12.686995655 
+0200
--- runtime/doc/popup.txt   2020-05-13 16:08:09.346889947 +0200
***
*** 191,196 
--- 198,204 
|popup_getoptions()|get current options for a popup
|popup_getpos()|get actual position and size of a popup
|popup_locate()|find popup window at a screen position
+   |popup_list()|  get list of all popups
  
  
  DETAILS   *popup-function-details*
***
*** 416,421 
--- 424,433 
Can also be used as a |method|: >
GetPopup()->popup_hide()
  
+ popup_list()   *popup_list()*
+   Return a List with the |window-ID| of all existing popups.
+ 
+ 
  popup_locate({row}, {col}) *popup_locate()*
Return the |window-ID| of the popup at screen position {row}
and {col}.  If there are multiple popups the one with the
*** ../vim-8.2.0747/src/popupwin.c  2020-05-13 13:40:12.690995638 +0200
--- src/popupwin.c  2020-05-13 16:17:57.640943266 +0200
***
*** 2720,2725 
--- 2720,2744 
hash_unlock(>dv_hashtab);
  }
  }
+ 
+ /*
+  * popup_list()
+  */
+ void
+ f_popup_list(typval_T *argvars UNUSED, typval_T *rettv)
+ {
+ win_T *wp;
+ tabpage_T *tp;
+ 
+ if (rettv_list_alloc(rettv) != OK)
+   return;
+ FOR_ALL_POPUPWINS(wp)
+   list_append_number(rettv->vval.v_list, wp->w_id);
+ FOR_ALL_TABPAGES(tp)
+   FOR_ALL_POPUPWINS_IN_TAB(tp, wp)
+   list_append_number(rettv->vval.v_list, wp->w_id);
+ }
+ 
  /*
   * popup_locate({row}, {col})
   */
*** ../vim-8.2.0747/src/proto/popupwin.pro  2020-05-13 13:40:12.690995638 
+0200
--- src/proto/popupwin.pro  2020-05-13 16:17:42.608993171 +0200
***
*** 40,45 
--- 40,46 
  void f_popup_move(typval_T *argvars, typval_T *rettv);
  void f_popup_setoptions(typval_T *argvars, typval_T *rettv);
  void f_popup_getpos(typval_T *argvars, typval_T *rettv);
+ void f_popup_list(typval_T *argvars, typval_T *rettv);
  void f_popup_locate(typval_T *argvars, typval_T *rettv);
  void f_popup_getoptions(typval_T *argvars, typval_T *rettv);
  int error_if_term_popup_window(void);
*** ../vim-8.2.0747/src/evalfunc.c  2020-05-13 13:40:12.686995655 +0200
--- src/evalfunc.c  2020-05-13 16:11:28.862235835 +0200
***
*** 715,720 
--- 715,721 
  {"popup_getoptions", 1, 1, FEARG_1, ret_dict_any, 
PROP_FUNC(f_popup_getoptions)},
  {"popup_getpos",  1, 1, FEARG_1,ret_dict_any, 
PROP_FUNC(f_popup_getpos)},
  {"popup_hide",1, 1, FEARG_1,ret_void, 
PROP_FUNC(f_popup_hide)},
+ {"popup_list",0, 0, 0,  ret_list_number, 
PROP_FUNC(f_popup_list)},
  {"popup_locate",  2, 2, 0,  ret_number,   
PROP_FUNC(f_popup_locate)},
  {"popup_menu",2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_menu)},
  {"popup_move",2, 2, FEARG_1,ret_void, 
PROP_FUNC(f_popup_move)},
*** ../vim-8.2.0747/src/testdir/test_popupwin.vim   2020-05-12 
22:02:17.893963155 +0200
--- src/testdir/test_popupwin.vim   2020-05-13 16:30:22.938475383 +0200
***
*** 428,434 
call delete('XtestPopupNospace')
  endfunc
  
! func Test_popup_firstline()
CheckScreendump
  
let lines =<< trim END
--- 428,434 
call delete('XtestPopupNospace')
  endfunc
  
! func Test_popup_firstline_dump()
CheckScreendump
  
let lines =<< trim END
***
*** 449,455 
--- 449,457 
" clean up
call StopVimInTerminal(buf)
call delete('XtestPopupFirstline')
+ endfunc
  
+ func Test_popup_firstline()
let winid = popup_create(['', '22', '3', '4'], #{

Patch 8.2.0747

2020-05-13 Fir de Conversatie Bram Moolenaar


Patch 8.2.0747
Problem:Cannot forcefully close all popups.
Solution:   Add the "force" argument to popup_clear().  Use it after running a
test.  Put back the check for a popup when editing a file.
Files:  runtime/doc/popup.txt, src/evalfunc.c, src/popupwin.c,
src/proto/popupwin.pro, src/tag.c, src/window.c, src/misc2.c,
src/ex_cmds.c, src/channel.c, src/testdir/runtest.vim,
src/testdir/test_terminal.vim


*** ../vim-8.2.0746/runtime/doc/popup.txt   2020-02-20 20:11:50.358377694 
+0100
--- runtime/doc/popup.txt   2020-05-13 01:22:11.519475665 +0200
***
*** 229,236 
GetText()->popup_beval({})
  <
*popup_clear()*
! popup_clear() Emergency solution to a misbehaving plugin: close all popup
windows for the current tab and global popups.
  
  
  popup_close({id} [, {result}])*popup_close()*
--- 236,250 
GetText()->popup_beval({})
  <
*popup_clear()*
! popup_clear([{force}])
!   Emergency solution to a misbehaving plugin: close all popup
windows for the current tab and global popups.
+   Close callbacks are not invoked.
+   When {force} is not present this will fail if the current
+   window is a popup.
+   When {force} is present and |TRUE| the popup is also closed
+   when it is the current window.  If a terminal is running in a
+   popup it is killed.
  
  
  popup_close({id} [, {result}])*popup_close()*
*** ../vim-8.2.0746/src/evalfunc.c  2020-04-29 22:30:09.313356305 +0200
--- src/evalfunc.c  2020-05-13 01:11:26.965843221 +0200
***
*** 704,710 
},
  {"popup_atcursor",2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_atcursor)},
  {"popup_beval",   2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_beval)},
! {"popup_clear",   0, 0, 0,  ret_void, 
PROP_FUNC(f_popup_clear)},
  {"popup_close",   1, 2, FEARG_1,ret_void, 
PROP_FUNC(f_popup_close)},
  {"popup_create",  2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_create)},
  {"popup_dialog",  2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_dialog)},
--- 704,710 
},
  {"popup_atcursor",2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_atcursor)},
  {"popup_beval",   2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_beval)},
! {"popup_clear",   0, 1, 0,  ret_void, 
PROP_FUNC(f_popup_clear)},
  {"popup_close",   1, 2, FEARG_1,ret_void, 
PROP_FUNC(f_popup_close)},
  {"popup_create",  2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_create)},
  {"popup_dialog",  2, 2, FEARG_1,ret_number,   
PROP_FUNC(f_popup_dialog)},
*** ../vim-8.2.0746/src/popupwin.c  2020-05-13 01:04:26.555407600 +0200
--- src/popupwin.c  2020-05-13 01:19:50.363992289 +0200
***
*** 2054,2062 
   * popup_clear()
   */
  void
! f_popup_clear(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
  {
! close_all_popups();
  }
  
  /*
--- 2054,2066 
   * popup_clear()
   */
  void
! f_popup_clear(typval_T *argvars, typval_T *rettv UNUSED)
  {
! int force = FALSE;
! 
! if (argvars[0].v_type != VAR_UNKNOWN)
!   force = (int)tv_get_number([0]);
! close_all_popups(force);
  }
  
  /*
***
*** 2163,2169 
// Careful: This may make "wp" invalid.
invoke_popup_callback(wp, arg);
  
! popup_close(id);
  CHECK_CURBUF;
  }
  
--- 2167,2173 
// Careful: This may make "wp" invalid.
invoke_popup_callback(wp, arg);
  
! popup_close(id, FALSE);
  CHECK_CURBUF;
  }
  
***
*** 2250,2256 
  }
  
  /*
!  * popup_filter_menu({text}, {options})
   */
  void
  f_popup_filter_menu(typval_T *argvars, typval_T *rettv)
--- 2254,2260 
  }
  
  /*
!  * popup_filter_menu({id}, {key})
   */
  void
  f_popup_filter_menu(typval_T *argvars, typval_T *rettv)
***
*** 2305,2311 
  }
  
  /*
!  * popup_filter_yesno({text}, {options})
   */
  void
  f_popup_filter_yesno(typval_T *argvars, typval_T *rettv)
--- 2309,2315 
  }
  
  /*
!  * popup_filter_yesno({id}, {key})
   */
  void
  f_popup_filter_yesno(typval_T *argvars, typval_T *rettv)
***
*** 2534,2540 
   * Return OK if the popup was closed, FAIL otherwise.
   */
  int
! popup_close(int id)
  {
  win_T *wp;
  tabpage_T *tp;
--- 2538,2544 
   * Return OK if the popup was closed, FAIL otherwise.
   */
  int
! popup_close(int id, int force)
  {
  win_T *wp;
  tabpage_T *tp;
***
*** 2546,2553 
{
if (wp == curwin)
  

Re: Test failure building 8.2.0746

2020-05-13 Fir de Conversatie Elimar Riesebieter
* Elimar Riesebieter  [2020-05-13 12:09 +0200]:

> Building 8.2.0746 on amd64 within a tmux-session gives the follwing test
> failure:
> 
> Failures:
> From test_terminal.vim:
> Found errors in Test_term_keycode_translation():
> Run 1:
> function RunTheTest[39]..Test_term_keycode_translation line 30: 
> Expected ['', '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', 
> '0123456789', '\t\t.+-*/'] but got ['', '', '', '', '', 
> '', '', '', '', '', '', '', '', 
> '', '', '', '', '', '', '', 
> '', '', '\t\t.+-*/', '', '', '', 
> '', '', '', '', '', '45678012']

Noticed this is https://github.com/vim/vim/issues/6070. 

I tried to run the test with different TERM (xterm,
rxvt-unicode-256color, tmux-256color) settings but no success.

Kitty is not available here. But to be honest, we shouldn't need a
special terminal emulator to run this test, though.

Elimar
-- 
  Obviously the human brain works like a computer.
  Since there are no stupid computers humans can't be stupid.
  There are just a few running with Windows or even CE ;-)

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20200513110911.dks3grn6asrxo26v%40toy.home.lxtec.de.


Test failure building 8.2.0746

2020-05-13 Fir de Conversatie Elimar Riesebieter
Building 8.2.0746 on amd64 within a tmux-session gives the follwing test
failure:

Failures:
From test_terminal.vim:
Found errors in Test_term_keycode_translation():
Run 1:
function RunTheTest[39]..Test_term_keycode_translation line 30: 
Expected ['', '', '', '', '', '', '', '', 
'', '', '', '', '', '', '', '', 
'', '', '', '', '', '', '', 
'', '', '', '', '', '', '', 
'0123456789', '\t\t.+-*/'] but got ['', '', '', '', '', 
'', '', '', '', '', '', '', '', 
'', '', '', '', '', '', '', 
'', '', '\t\t.+-*/', '', '', '', 
'', '', '', '', '', '45678012']

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20200513100900.zbv4vwggmd332227%40toy.home.lxtec.de.


Re: [vim/vim] Failed test 'test_terminal.vim' after patch 8.2.0738 (#6070)

2020-05-13 Fir de Conversatie Yegappan Lakshmanan
Hi,

On Tue, May 12, 2020 at 11:01 PM Vladimir Lomov 
wrote:

> Hello Yegappan,
>
> This table confirms that when the TERM is set to xterm-kitty (according to
> the kitty FAQ,
> this is the proper value for TERM), the Vim terminal key code translation
> works correctly. For all the other TERM settings, the key code translation
> is not correct.
>
> Do I understand you correctly that test will run successfully only in
> xterm-kitty terminal?
>

Yes. The TERM variable should be set to the appropriate value to match the
current
terminal. Otherwise the escape sequences sent by Vim will not be properly
interpreted
by the terminal.


> Or vim somehow tries to figure out in what terminal it being run and run
> terminal test using correct terminal keycodes?
>
> I thought that setting TERM=xterm is enough to run tests successfully on
> xterm-compatible terminal.
>

Even though different terminals claim to be xterm compatible, there are
still
some differences (i.e. they are not fully compatible with xterm).


> I'm a bit perplexed now. I tried several terminal emulators, VT (virtual
> console) but either in kitty or termite itself or when I set
> TERM=xterm-kitty or TERM=xterm-termite this test is passed while other
> variants fail.
>
>
>
For the alacritty terminal, you should set the TERM variable to alacritty.

Regards,
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7n4wU6_%3DKetyUw1hGCXS3ejuO9rKinWG0hD6wCAMOWgug%40mail.gmail.com.