Re: uppercase meta maps in xterm vim

2020-01-30 Fir de Conversatie Pavol Juhas
On Wed, Jan 29, 2020 at 12:58 PM Bram Moolenaar  wrote:
...
> Try  or .  Shift is a separate modifier.

That works great, thank you!

> > Another observation - in a command or insert mode 
> > produces accented character "รก", 225, Digr a', which is to my
understanding
> > a translated keycode.  Mapping this character however does not work
either.
...
> Something may get a hold of the key before it is passed from the
> terminal to Vim.  Especially various input methods.  It can also depend
> on the current locale and keyboard configuration.

My locale is "en_US.UTF-8" and I have tested this with XTerm started
after "xrdb -remove .Xresources" to eliminate personal XTerm setup.
If I do ":set showcmd wd=50" in vim the accented character briefly
shows in the showcmd area, but its mapping is not triggered.

Thank you,

Pavol

-- 
-- 
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/CAA44gkUOSTJhYc%3DFz2fT9ZChP2%3DJsy1_Yw6r0NhfjSPt_%2Bs76Q%40mail.gmail.com.


Re: [BUG] Confusing behavior of the char_avail() function breaks titlestring

2020-01-30 Fir de Conversatie Bram Moolenaar


Jason Franklin wrote:

> On 1/30/20 10:14 AM, Bram Moolenaar wrote:
> > I don't see any problem.  Window title is updated and status line shows
> > properly.
> > 
> I have attached a screenshot that shows what I see after running this
> command:
> 
>   VIMRUNTIME=../runtime ./vim -u NONE \
> --cmd 'set nocp lz title laststatus=2'
> 
> When you say there is no problem, do you mean that the rendering happens
> as expected, or after you press a key?  I need to press a key to see the
> screen update.

I don't need to press a key.

You could try to set $TERM to different values.

-- 
hundred-and-one symptoms of being an internet addict:
23. You can't call your mother... she doesn't have VOIP

 /// 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/202001301853.00UIrMRO029514%40masaka.moolenaar.net.


Patch 8.2.0184

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0184
Problem:Blob test fails.
Solution:   Check for different error when float feature is missing.
Files:  src/testdir/test_blob.vim


*** ../vim-8.2.0183/src/testdir/test_blob.vim   2020-01-30 18:24:46.997204019 
+0100
--- src/testdir/test_blob.vim   2020-01-30 19:12:06.665017572 +0100
***
*** 324,328 
  endfunc
  
  func Test_blob_sort()
!   call assert_fails('call sort(["abc", 0z11], "f")', 'E702:')
  endfunc
--- 324,332 
  endfunc
  
  func Test_blob_sort()
!   if has('float')
! call assert_fails('call sort([1.0, 0z11], "f")', 'E975:')
!   else
! call assert_fails('call sort(["abc", 0z11], "f")', 'E702:')
!   endif
  endfunc
*** ../vim-8.2.0183/src/version.c   2020-01-30 18:24:47.001204003 +0100
--- src/version.c   2020-01-30 18:39:36.457681912 +0100
***
*** 744,745 
--- 744,747 
  {   /* Add new patch number below this line */
+ /**/
+ 184,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
22. You've already visited all the links at Yahoo and you're halfway through
Lycos.

 /// 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/202001301839.00UIdY2Z026113%40masaka.moolenaar.net.


Patch 8.2.0183

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0183
Problem:Tests fail when the float feature is disabled.
Solution:   Skip tests that don't work without float support.
Files:  src/testdir/shared.vim, src/testdir/test_blob.vim,
src/testdir/test_channel.vim, src/testdir/test_cscope.vim,
src/testdir/test_execute_func.vim, src/testdir/test_expr.vim,
src/testdir/test_functions.vim, src/testdir/test_lambda.vim,
src/testdir/test_listdict.vim, src/testdir/test_lua.vim,
src/testdir/test_options.vim, src/testdir/test_partial.vim,
src/testdir/test_ruby.vim, src/testdir/test_sort.vim,
src/testdir/test_timers.vim, src/testdir/test_true_false.vim,
src/testdir/test_user_func.vim, src/testdir/test_vim9_expr.vim,
src/testdir/test_vimscript.vim, src/testdir/test_regexp_latin.vim,
src/testdir/test_glob2regpat.vim


*** ../vim-8.2.0182/src/testdir/shared.vim  2019-10-20 22:25:49.0 
+0200
--- src/testdir/shared.vim  2020-01-30 17:09:55.038803727 +0100
***
*** 156,162 
  func s:WaitForCommon(expr, assert, timeout)
" using reltime() is more accurate, but not always available
let slept = 0
!   if has('reltime')
  let start = reltime()
endif
  
--- 156,162 
  func s:WaitForCommon(expr, assert, timeout)
" using reltime() is more accurate, but not always available
let slept = 0
!   if exists('*reltimefloat')
  let start = reltime()
endif
  
***
*** 181,187 
  endif
  
  sleep 10m
! if has('reltime')
let slept = float2nr(reltimefloat(reltime(start)) * 1000)
  else
let slept += 10
--- 181,187 
  endif
  
  sleep 10m
! if exists('*reltimefloat')
let slept = float2nr(reltimefloat(reltime(start)) * 1000)
  else
let slept += 10
***
*** 197,203 
  " feeds key-input and resumes process. Return time waited in milliseconds.
  " Without +timers it uses simply :sleep.
  func Standby(msec)
!   if has('timers')
  let start = reltime()
  let g:_standby_timer = timer_start(a:msec, function('s:feedkeys'))
  call getchar()
--- 197,203 
  " feeds key-input and resumes process. Return time waited in milliseconds.
  " Without +timers it uses simply :sleep.
  func Standby(msec)
!   if has('timers') && exists('*reltimefloat')
  let start = reltime()
  let g:_standby_timer = timer_start(a:msec, function('s:feedkeys'))
  call getchar()
*** ../vim-8.2.0182/src/testdir/test_blob.vim   2020-01-15 20:51:31.301128122 
+0100
--- src/testdir/test_blob.vim   2020-01-30 17:03:39.876198018 +0100
***
*** 324,328 
  endfunc
  
  func Test_blob_sort()
!   call assert_fails('call sort([1.0, 0z11], "f")', 'E975:')
  endfunc
--- 324,328 
  endfunc
  
  func Test_blob_sort()
!   call assert_fails('call sort(["abc", 0z11], "f")', 'E702:')
  endfunc
*** ../vim-8.2.0182/src/testdir/test_channel.vim2020-01-26 
21:59:25.632718110 +0100
--- src/testdir/test_channel.vim2020-01-30 17:14:25.021776716 +0100
***
*** 202,211 
  
" Reading while there is nothing available.
call assert_equal(v:none, ch_read(handle, {'timeout': 0}))
!   let start = reltime()
!   call assert_equal(v:none, ch_read(handle, {'timeout': 333}))
!   let elapsed = reltime(start)
!   call assert_inrange(0.3, 0.6, reltimefloat(reltime(start)))
  
" Send without waiting for a response, then wait for a response.
call ch_sendexpr(handle, 'wait a bit')
--- 202,213 
  
" Reading while there is nothing available.
call assert_equal(v:none, ch_read(handle, {'timeout': 0}))
!   if exists('*reltimefloat')
! let start = reltime()
! call assert_equal(v:none, ch_read(handle, {'timeout': 333}))
! let elapsed = reltime(start)
! call assert_inrange(0.3, 0.6, reltimefloat(reltime(start)))
!   endif
  
" Send without waiting for a response, then wait for a response.
call ch_sendexpr(handle, 'wait a bit')
***
*** 412,417 
--- 414,421 
  
  " Test that trying to connect to a non-existing port fails quickly.
  func Test_connect_waittime()
+   CheckFunction reltimefloat
+ 
call ch_log('Test_connect_waittime()')
let start = reltime()
let handle = ch_open('localhost:9876', s:chopt)
***
*** 927,932 
--- 931,938 
  endfunc
  
  func Test_pipe_to_buffer_json()
+   CheckFunction reltimefloat
+ 
let job = job_start(s:python . " test_channel_pipe.py",
\ {'out_io': 'buffer', 'out_mode': 'json'})
call assert_equal("run", job_status(job))
***
*** 1423,1428 
--- 1429,1436 
  endfunction
  
  func Test_exit_callback_interval()
+   CheckFunction reltimefloat
+ 
let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
let job = [s:python, '-c', 'import 
time;time.sleep(0.5)']->job_start({'exit_cb': 'MyExitTimeCb'})
let g:exit_cb_val.process = 

Patch 8.2.0182

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0182
Problem:Min() and max() materialize a range() list.
Solution:   Compute the result without materializing the list. (#5541)
Files:  src/evalfunc.c


*** ../vim-8.2.0181/src/evalfunc.c  2020-01-29 21:27:17.574406732 +0100
--- src/evalfunc.c  2020-01-30 16:35:02.014749442 +0100
***
*** 4881,4901 
listitem_T  *li;
  
l = argvars[0].vval.v_list;
!   if (l != NULL)
{
!   range_list_materialize(l);
!   li = l->lv_first;
!   if (li != NULL)
{
!   n = tv_get_number_chk(>li_tv, );
!   for (;;)
{
!   li = li->li_next;
!   if (li == NULL)
!   break;
!   i = tv_get_number_chk(>li_tv, );
!   if (domax ? i > n : i < n)
!   n = i;
}
}
}
--- 4881,4911 
listitem_T  *li;
  
l = argvars[0].vval.v_list;
!   if (l != NULL && l->lv_len > 0)
{
!   if (l->lv_first == _list_item)
{
!   if ((l->lv_u.nonmat.lv_stride > 0) ^ domax)
!   n = l->lv_u.nonmat.lv_start;
!   else
!   n = l->lv_u.nonmat.lv_start + (l->lv_len - 1)
!   * l->lv_u.nonmat.lv_stride;
!   }
!   else
!   {
!   li = l->lv_first;
!   if (li != NULL)
{
!   n = tv_get_number_chk(>li_tv, );
!   for (;;)
!   {
!   li = li->li_next;
!   if (li == NULL)
!   break;
!   i = tv_get_number_chk(>li_tv, );
!   if (domax ? i > n : i < n)
!   n = i;
!   }
}
}
}
*** ../vim-8.2.0181/src/version.c   2020-01-30 16:27:02.068562909 +0100
--- src/version.c   2020-01-30 16:36:20.114447303 +0100
***
*** 744,745 
--- 744,747 
  {   /* Add new patch number below this line */
+ /**/
+ 182,
  /**/

-- 
Shift happens.
-- Doppler

 /// 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/202001301540.00UFeb3I030667%40masaka.moolenaar.net.


Patch 8.2.0181

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0181
Problem:Problems parsing :term arguments.
Solution:   Improve parsing, fix memory leak, add tests. (Ozaki Kiichi,
closes #5536)
Files:  src/channel.c, src/proto/channel.pro, src/structs.h,
src/terminal.c, src/testdir/test_terminal.vim


*** ../vim-8.2.0180/src/channel.c   2020-01-29 21:27:17.578406709 +0100
--- src/channel.c   2020-01-30 16:21:12.089824065 +0100
***
*** 4787,4794 
if (!(supported & JO_OUT_IO))
break;
opt->jo_set |= JO_OUT_NAME << (part - PART_OUT);
!   opt->jo_io_name[part] =
!  tv_get_string_buf_chk(item, opt->jo_io_name_buf[part]);
}
else if (STRCMP(hi->hi_key, "pty") == 0)
{
--- 4787,4794 
if (!(supported & JO_OUT_IO))
break;
opt->jo_set |= JO_OUT_NAME << (part - PART_OUT);
!   opt->jo_io_name[part] = tv_get_string_buf_chk(item,
!  opt->jo_io_name_buf[part]);
}
else if (STRCMP(hi->hi_key, "pty") == 0)
{
***
*** 4953,4959 
if (!(supported2 & JO2_TERM_NAME))
break;
opt->jo_set2 |= JO2_TERM_NAME;
!   opt->jo_term_name = tv_get_string_chk(item);
if (opt->jo_term_name == NULL)
{
semsg(_(e_invargval), "term_name");
--- 4953,4960 
if (!(supported2 & JO2_TERM_NAME))
break;
opt->jo_set2 |= JO2_TERM_NAME;
!   opt->jo_term_name = tv_get_string_buf_chk(item,
!  opt->jo_term_name_buf);
if (opt->jo_term_name == NULL)
{
semsg(_(e_invargval), "term_name");
***
*** 4980,4986 
if (!(supported2 & JO2_TERM_OPENCMD))
break;
opt->jo_set2 |= JO2_TERM_OPENCMD;
!   p = opt->jo_term_opencmd = tv_get_string_chk(item);
if (p != NULL)
{
// Must have %d and no other %.
--- 4981,4988 
if (!(supported2 & JO2_TERM_OPENCMD))
break;
opt->jo_set2 |= JO2_TERM_OPENCMD;
!   p = opt->jo_term_opencmd = tv_get_string_buf_chk(item,
!   opt->jo_term_opencmd_buf);
if (p != NULL)
{
// Must have %d and no other %.
***
*** 4997,5009 
}
else if (STRCMP(hi->hi_key, "eof_chars") == 0)
{
-   char_u *p;
- 
if (!(supported2 & JO2_EOF_CHARS))
break;
opt->jo_set2 |= JO2_EOF_CHARS;
!   p = opt->jo_eof_chars = tv_get_string_chk(item);
!   if (p == NULL)
{
semsg(_(e_invargval), "eof_chars");
return FAIL;
--- 4999,5010 
}
else if (STRCMP(hi->hi_key, "eof_chars") == 0)
{
if (!(supported2 & JO2_EOF_CHARS))
break;
opt->jo_set2 |= JO2_EOF_CHARS;
!   opt->jo_eof_chars = tv_get_string_buf_chk(item,
!  opt->jo_eof_chars_buf);
!   if (opt->jo_eof_chars == NULL)
{
semsg(_(e_invargval), "eof_chars");
return FAIL;
***
*** 5082,5088 
if (!(supported2 & JO2_TERM_KILL))
break;
opt->jo_set2 |= JO2_TERM_KILL;
!   opt->jo_term_kill = tv_get_string_chk(item);
}
else if (STRCMP(hi->hi_key, "tty_type") == 0)
{
--- 5083,5095 
if (!(supported2 & JO2_TERM_KILL))
break;
opt->jo_set2 |= JO2_TERM_KILL;
!   opt->jo_term_kill = tv_get_string_buf_chk(item,
!  opt->jo_term_kill_buf);
!   if (opt->jo_term_kill == NULL)
!   {
!   semsg(_(e_invargval), "term_kill");
!   return FAIL;
!   }
}
else if (STRCMP(hi->hi_key, "tty_type") == 0)
{
***
*** 5157,5163 
break;
opt->jo_set2 |= JO2_TERM_API;
opt->jo_term_api = tv_get_string_buf_chk(item,
!opt->jo_term_api_buf);
}
  #endif
else if (STRCMP(hi->hi_key, "env") == 0)
--- 5164,5175 
break;
opt->jo_set2 |= JO2_TERM_API;
opt->jo_term_api = 

Re: [BUG] Confusing behavior of the char_avail() function breaks titlestring

2020-01-30 Fir de Conversatie Franklin, Jason
On 1/30/20 10:14 AM, Bram Moolenaar wrote:
> I don't see any problem.  Window title is updated and status line shows
> properly.
> 

I have attached a screenshot that shows what I see after running this
command:

  VIMRUNTIME=../runtime ./vim -u NONE \
--cmd 'set nocp lz title laststatus=2'

When you say there is no problem, do you mean that the rendering happens
as expected, or after you press a key?  I need to press a key to see the
screen update.

-- 
Jason Franklin

-- 
-- 
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/3be0bc07-72fe-a2d4-3f82-42817e8ad62f%40quoininc.com.


signature.asc
Description: OpenPGP digital signature


Re: [BUG] Confusing behavior of the char_avail() function breaks titlestring

2020-01-30 Fir de Conversatie Bram Moolenaar


Jason Franklin wrote:

> On 1/30/20 8:02 AM, Christian Brabandt wrote:
> > Have you tried with a dumb terminal, so Vim won't try to figure all this 
> > out, e.g. TERM=dumb vim  (you won't have fun with this one, as it 
> > doesn't show colors)
> > 
> > or alternatively with one of the builtin terminals:
> > 
> > VIMRUNTIME=../runtime ./vim -u NONE -N --cmd ':set term=builtin_ansi'
> 
> I gave this a shot, and it definitely didn't solve the problem.
> 
> I think the real solution here is to make sure that maketitle() can do
> its work at start up regardless of the result of char_avail().  Is that
> reasonable?  More work may be necessary to really get it right, though
> (see the following note).
> 
> N.B.:
> 
> I need to note here that the title string is not the only user interface
> element that is broken by this problem.  Try the following:
> 
>   VIMRUNTIME=../runtime ./vim -u NONE \
> --cmd 'set nocp lz title laststatus=2'
> 
> You will see that even the status line is blocked at startup.  The
> screen will redraw when a key is pressed (e.g., "l").  However, this
> looks really bad and happens with any basic vimrc file that sets these
> options.
> 
> Again, this happens in: xterm, konsole, and gnome-terminal.

I don't see any problem.  Window title is updated and status line shows
properly.

-- 
When a fly lands on the ceiling, does it do a half roll or
a half loop?

 /// 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/202001301514.00UFEChE018705%40masaka.moolenaar.net.


Patch 8.2.0180

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0180
Problem:Test for wrapmargin fails if terminal is not 80 columns.
Solution:   Vertical split the window. (Ken Takata, closes #5554)
Files:  src/testdir/test_textformat.vim


*** ../vim-8.2.0179/src/testdir/test_textformat.vim 2020-01-29 
21:57:28.745607653 +0100
--- src/testdir/test_textformat.vim 2020-01-30 16:06:57.745318734 +0100
***
*** 425,436 
enew!
  
" align text with 'wrapmargin'
call setline(1, ['Vim'])
!   set textwidth=0
!   set wrapmargin=60
right
call assert_equal("\t\t Vim", getline(1))
!   set wrapmargin&
  
set tw&
  endfunc
--- 425,437 
enew!
  
" align text with 'wrapmargin'
+   50vnew
call setline(1, ['Vim'])
!   setl textwidth=0
!   setl wrapmargin=30
right
call assert_equal("\t\t Vim", getline(1))
!   q!
  
set tw&
  endfunc
*** ../vim-8.2.0179/src/version.c   2020-01-30 14:55:29.010670407 +0100
--- src/version.c   2020-01-30 16:09:06.256793617 +0100
***
*** 744,745 
--- 744,747 
  {   /* Add new patch number below this line */
+ /**/
+ 180,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
19. All of your friends have an @ in their names.

 /// 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/202001301510.00UFA08g017759%40masaka.moolenaar.net.


Patch 8.2.0179

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0179
Problem:Still a few places where range() does not work.
Solution:   Fix using range() causing problems.
Files:  src/terminal.c, src/testdir/test_functions.vim,
src/testdir/test_popupwin.vim, src/popupwin.c, src/tag.c,
src/testdir/dumps/Test_popupwin_20.dump,
src/testdir/dumps/Test_popupwin_21.dump,
src/testdir/dumps/Test_popup_settext_07.dump, src/globals.h


*** ../vim-8.2.0178/src/terminal.c  2019-12-05 21:31:25.0 +0100
--- src/terminal.c  2020-01-30 12:43:47.210765911 +0100
***
*** 417,423 
  if ((opt->jo_set & (JO_IN_IO + JO_OUT_IO + JO_ERR_IO))
 == (JO_IN_IO + JO_OUT_IO + JO_ERR_IO)
|| (!(opt->jo_set & JO_OUT_IO) && (opt->jo_set & JO_OUT_BUF))
!   || (!(opt->jo_set & JO_ERR_IO) && (opt->jo_set & JO_ERR_BUF)))
  {
emsg(_(e_invarg));
return NULL;
--- 417,427 
  if ((opt->jo_set & (JO_IN_IO + JO_OUT_IO + JO_ERR_IO))
 == (JO_IN_IO + JO_OUT_IO + JO_ERR_IO)
|| (!(opt->jo_set & JO_OUT_IO) && (opt->jo_set & JO_OUT_BUF))
!   || (!(opt->jo_set & JO_ERR_IO) && (opt->jo_set & JO_ERR_BUF))
!   || (argvar != NULL
!   && argvar->v_type == VAR_LIST
!   && argvar->vval.v_list != NULL
!   && argvar->vval.v_list->lv_first == _list_item))
  {
emsg(_(e_invarg));
return NULL;
***
*** 538,544 
}
else if (argvar->v_type != VAR_LIST
|| argvar->vval.v_list == NULL
!   || argvar->vval.v_list->lv_len < 1
|| (cmd = tv_get_string_chk(
   >vval.v_list->lv_first->li_tv)) == NULL)
cmd = (char_u*)"";
--- 542,548 
}
else if (argvar->v_type != VAR_LIST
|| argvar->vval.v_list == NULL
!   || argvar->vval.v_list->lv_len == 0
|| (cmd = tv_get_string_chk(
   >vval.v_list->lv_first->li_tv)) == NULL)
cmd = (char_u*)"";
***
*** 3763,3771 
  {
  int   n = 0;
  long_urgb[16];
! listitem_T*li = list->lv_first;
  
! for (; li != NULL && n < 16; li = li->li_next, n++)
  {
char_u  *color_name;
guicolor_T  guicolor;
--- 3767,3775 
  {
  int   n = 0;
  long_urgb[16];
! listitem_T*li;
  
! for (li = list->lv_first; li != NULL && n < 16; li = li->li_next, n++)
  {
char_u  *color_name;
guicolor_T  guicolor;
***
*** 3800,3805 
--- 3804,3810 
  if (var != NULL
&& (var->di_tv.v_type != VAR_LIST
|| var->di_tv.vval.v_list == NULL
+   || var->di_tv.vval.v_list->lv_first == _list_item
|| set_ansi_colors_list(vterm, var->di_tv.vval.v_list) == FAIL))
semsg(_(e_invarg2), "g:terminal_ansi_colors");
  }
*** ../vim-8.2.0178/src/testdir/test_functions.vim  2020-01-28 
20:49:02.288376955 +0100
--- src/testdir/test_functions.vim  2020-01-30 14:46:13.248820418 +0100
***
*** 1955,1966 
--- 1955,2003 
call setreg('a', range(3))
call assert_equal("0\n1\n2\n", getreg('a'))
  
+   " settagstack()
+   call settagstack(1, #{items : range(4)})
+   
+   " sign_define()
+   call assert_fails("call sign_define(range(5))", "E715:")
+   call assert_fails("call sign_placelist(range(5))", "E715:")
+ 
+   " sign_undefine()
+   call assert_fails("call sign_undefine(range(5))", "E908:")
+ 
+   " sign_unplacelist()
+   call assert_fails("call sign_unplacelist(range(5))", "E715:")
+ 
" sort()
call assert_equal([0, 1, 2, 3, 4, 5], sort(range(5, 0, -1)))
  
+   " 'spellsuggest'
+   func MySuggest()
+ return range(3)
+   endfunc
+   set spell spellsuggest=expr:MySuggest()
+   call assert_equal([], spellsuggest('baord', 3))
+   set nospell spellsuggest&
+ 
" string()
call assert_equal('[0, 1, 2, 3, 4]', string(range(5)))
  
+   " taglist() with 'tagfunc'
+   func TagFunc(pattern, flags, info)
+ return range(10)
+   endfunc
+   set tagfunc=TagFunc
+   call assert_fails("call taglist('asdf')", 'E987:')
+   set tagfunc=
+   
+   " term_start()
+   if has('terminal')
+ call assert_fails('call term_start(range(3, 4))', 'E474:')
+ let g:terminal_ansi_colors = range(16)
+ call assert_fails('call term_start("ls", #{term_finish: "close"})', 
'E475:')
+ unlet g:terminal_ansi_colors
+   endif
+ 
" type()
call assert_equal(v:t_list, type(range(5)))
  
*** ../vim-8.2.0178/src/testdir/test_popupwin.vim   2020-01-23 
15:33:31.526017874 +0100
--- src/testdir/test_popupwin.vim   2020-01-30 14:06:25.639470949 +0100
***
*** 86,92 
  call popup_create('hello padding', #{line: 2, col: 23, padding: []})
  call popup_create('hello both', #{line: 2, 

Re: [BUG] Confusing behavior of the char_avail() function breaks titlestring

2020-01-30 Fir de Conversatie Franklin, Jason
On 1/30/20 8:02 AM, Christian Brabandt wrote:
> Have you tried with a dumb terminal, so Vim won't try to figure all this 
> out, e.g. TERM=dumb vim  (you won't have fun with this one, as it 
> doesn't show colors)
> 
> or alternatively with one of the builtin terminals:
> 
> VIMRUNTIME=../runtime ./vim -u NONE -N --cmd ':set term=builtin_ansi'

I gave this a shot, and it definitely didn't solve the problem.

I think the real solution here is to make sure that maketitle() can do
its work at start up regardless of the result of char_avail().  Is that
reasonable?  More work may be necessary to really get it right, though
(see the following note).

N.B.:

I need to note here that the title string is not the only user interface
element that is broken by this problem.  Try the following:

  VIMRUNTIME=../runtime ./vim -u NONE \
--cmd 'set nocp lz title laststatus=2'

You will see that even the status line is blocked at startup.  The
screen will redraw when a key is pressed (e.g., "l").  However, this
looks really bad and happens with any basic vimrc file that sets these
options.

Again, this happens in: xterm, konsole, and gnome-terminal.

-- 
Jason Franklin

-- 
-- 
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/2cd84b2a-6e4e-606d-0012-be587a2cabfd%40quoininc.com.


signature.asc
Description: OpenPGP digital signature


Re: [BUG] Confusing behavior of the char_avail() function breaks titlestring

2020-01-30 Fir de Conversatie Christian Brabandt


On Mi, 29 Jan 2020, Jason Franklin wrote:

> 1. maketitle() is called twice in the NeoVim startup process, once in Vim
> 2. in NeoVim, char_avail() is zero even with the same options as above (-u 
> NONE --cmd 'set nocp lz title')
> 
> I'm not sure why char_avail() returns a different response here.
> 
> I'm not sure how to go about setting t_RV to an empty string. I tried the 
> following:
> 
>   VIMRUNTIME=../runtime ./vim -u NONE --cmd 'set nocp t_RV= lz title'

Yes, that should be correct. There are a couple of other terminal 
properties, that Vim queries on startup, like terminal version (t_TV), 
cursor position (t_u7), terminal foreground/background color (t_RF, 
t_RB), terminal cursor blinking (t_RC) and cursor style (t_RS), possibly 
more, that I couldn't find out easily.

Have you tried with a dumb terminal, so Vim won't try to figure all this 
out, e.g. TERM=dumb vim  (you won't have fun with this one, as it 
doesn't show colors)

or alternatively with one of the builtin terminals:

VIMRUNTIME=../runtime ./vim -u NONE -N --cmd ':set term=builtin_ansi'

Best,
Christian
-- 
Wie man sein Kind nicht nennen sollte: 
  Immo Bilie 

-- 
-- 
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/20200130130243.GC803%40256bit.org.


Patch 8.2.0178

2020-01-30 Fir de Conversatie Bram Moolenaar


Patch 8.2.0178
Problem:With VTP the screen may not be restored properly.
Solution:   Add another set of saved RGB values. (Nobuhiro Takasaki,
closes #5548)
Files:  src/os_win32.c


*** ../vim-8.2.0177/src/os_win32.c  2020-01-26 21:59:25.628718127 +0100
--- src/os_win32.c  2020-01-30 11:53:15.746586193 +0100
***
*** 200,205 
--- 200,207 
  
  static guicolor_T save_console_bg_rgb;
  static guicolor_T save_console_fg_rgb;
+ static guicolor_T store_console_bg_rgb;
+ static guicolor_T store_console_fg_rgb;
  
  static int g_color_index_bg = 0;
  static int g_color_index_fg = 7;
***
*** 217,222 
--- 219,225 
  
  static void set_console_color_rgb(void);
  static void reset_console_color_rgb(void);
+ static void restore_console_color_rgb(void);
  #endif
  
  // This flag is newly created from Windows 10
***
*** 5496,5502 
  cb = _cbNonTermcap;
  # endif
  RestoreConsoleBuffer(cb, p_rs);
! reset_console_color_rgb();
  SetConsoleCursorInfo(g_hConOut, _cci);
  
  if (p_rs || exiting)
--- 5499,5505 
  cb = _cbNonTermcap;
  # endif
  RestoreConsoleBuffer(cb, p_rs);
! restore_console_color_rgb();
  SetConsoleCursorInfo(g_hConOut, _cci);
  
  if (p_rs || exiting)
***
*** 7327,7332 
--- 7330,7337 
pGetConsoleScreenBufferInfoEx(g_hConOut, );
  save_console_bg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_bg];
  save_console_fg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_fg];
+ store_console_bg_rgb = save_console_bg_rgb;
+ store_console_fg_rgb = save_console_fg_rgb;
  
  # ifdef FEAT_TERMGUICOLORS
  bg = (COLORREF)csbi.ColorTable[g_color_index_bg];
***
*** 7343,7349 
  static void
  vtp_exit(void)
  {
! reset_console_color_rgb();
  }
  
  static int
--- 7348,7354 
  static void
  vtp_exit(void)
  {
! restore_console_color_rgb();
  }
  
  static int
***
*** 7433,7438 
--- 7438,7445 
  csbi.cbSize = sizeof(csbi);
  csbi.srWindow.Right += 1;
  csbi.srWindow.Bottom += 1;
+ store_console_bg_rgb = csbi.ColorTable[g_color_index_bg];
+ store_console_fg_rgb = csbi.ColorTable[g_color_index_fg];
  csbi.ColorTable[g_color_index_bg] = (COLORREF)bg;
  csbi.ColorTable[g_color_index_fg] = (COLORREF)fg;
  if (has_csbiex)
***
*** 7485,7495 
--- 7492,7528 
  }
  # endif
  
+ /*
+  * Set the console colors to the original colors or the last set colors.
+  */
  static void
  reset_console_color_rgb(void)
  {
  # ifdef FEAT_TERMGUICOLORS
  DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi;
+ 
+ csbi.cbSize = sizeof(csbi);
+ if (has_csbiex)
+   pGetConsoleScreenBufferInfoEx(g_hConOut, );
+ 
+ csbi.cbSize = sizeof(csbi);
+ csbi.srWindow.Right += 1;
+ csbi.srWindow.Bottom += 1;
+ csbi.ColorTable[g_color_index_bg] = (COLORREF)store_console_bg_rgb;
+ csbi.ColorTable[g_color_index_fg] = (COLORREF)store_console_fg_rgb;
+ if (has_csbiex)
+   pSetConsoleScreenBufferInfoEx(g_hConOut, );
+ # endif
+ }
+ 
+ /*
+  * Set the console colors to the original colors.
+  */
+ static void
+ restore_console_color_rgb(void)
+ {
+ # ifdef FEAT_TERMGUICOLORS
+ DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi;
  
  csbi.cbSize = sizeof(csbi);
  if (has_csbiex)
*** ../vim-8.2.0177/src/version.c   2020-01-29 22:38:41.848961650 +0100
--- src/version.c   2020-01-30 11:51:20.982962194 +0100
***
*** 744,745 
--- 744,747 
  {   /* Add new patch number below this line */
+ /**/
+ 178,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
17. You turn on your intercom when leaving the room so you can hear if new
e-mail arrives.

 /// 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/202001301054.00UAsV8v028426%40masaka.moolenaar.net.