Found errors in Test_xterm_mouse_middle_click()

2019-04-27 Fir de Conversatie Elimar Riesebieter
>From test_termcodes.vim:
Found errors in Test_xterm_mouse_middle_click():
Caught exception in Test_xterm_mouse_middle_click(): Vim(let):E354: Invalid 
register name: '*' @ function RunTheTest[40]..Test_xterm_mouse_middle_click, 
line 6
TEST 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: "Download about Vim" official site

2019-04-27 Fir de Conversatie Yusuke Fujita
>You simply forgot to install the binaries and all required runtime 
>files. It would work if you run ~/vim/src/vim 

Well, I will try it. thank you.

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1222 (after 8.1.1219)
Problem:Build still fails on MS-Windows.
Solution:   Move another declaration to start of block.
Files:  src/libvterm/src/state.c


*** ../vim-8.1.1221/src/libvterm/src/state.c2019-04-27 22:38:26.788107972 
+0200
--- src/libvterm/src/state.c2019-04-27 22:43:52.602605129 +0200
***
*** 1656,1666 
}
  
if(rows != state->rows) {
  VTermLineInfo *newlineinfo = vterm_allocator_malloc(state->vt, rows * 
sizeof(VTermLineInfo));
  if (newlineinfo == NULL)
return 0;
  
- int row;
  for(row = 0; row < state->rows && row < rows; row++) {
newlineinfo[row] = state->lineinfo[row];
  }
--- 1656,1666 
}
  
if(rows != state->rows) {
+ int row;
  VTermLineInfo *newlineinfo = vterm_allocator_malloc(state->vt, rows * 
sizeof(VTermLineInfo));
  if (newlineinfo == NULL)
return 0;
  
  for(row = 0; row < state->rows && row < rows; row++) {
newlineinfo[row] = state->lineinfo[row];
  }
*** ../vim-8.1.1221/src/version.c   2019-04-27 22:40:03.927661368 +0200
--- src/version.c   2019-04-27 22:44:21.166472794 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1222,
  /**/

-- 
WOMAN:   I didn't know we had a king. I thought we were an autonomous
 collective.
DENNIS:  You're fooling yourself.  We're living in a dictatorship.  A
 self-perpetuating autocracy in which the working classes--
WOMAN:   Oh there you go, bringing class into it again.
DENNIS:  That's what it's all about if only people would--
  The Quest for the Holy Grail (Monty Python)

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1220 (after 8.1.1219)
Problem:Build fails on MS-Windows.
Solution:   Move declaration to start of block.
Files:  src/libvterm/src/state.c


*** ../vim-8.1.1219/src/libvterm/src/state.c2019-04-27 22:06:33.352200698 
+0200
--- src/libvterm/src/state.c2019-04-27 22:36:49.400554045 +0200
***
*** 1629,1640 
VTermPos delta = { 0, 0 };
  
if(cols != state->cols) {
  unsigned char *newtabstops = vterm_allocator_malloc(state->vt, (cols + 7) 
/ 8);
  if (newtabstops == NULL)
return 0;
  
  /* TODO: This can all be done much more efficiently bytewise */
- int col;
  for(col = 0; col < state->cols && col < cols; col++) {
unsigned char mask = 1 << (col & 7);
if(state->tabstops[col >> 3] & mask)
--- 1629,1640 
VTermPos delta = { 0, 0 };
  
if(cols != state->cols) {
+ int col;
  unsigned char *newtabstops = vterm_allocator_malloc(state->vt, (cols + 7) 
/ 8);
  if (newtabstops == NULL)
return 0;
  
  /* TODO: This can all be done much more efficiently bytewise */
  for(col = 0; col < state->cols && col < cols; col++) {
unsigned char mask = 1 << (col & 7);
if(state->tabstops[col >> 3] & mask)
*** ../vim-8.1.1219/src/version.c   2019-04-27 22:06:33.352200698 +0200
--- src/version.c   2019-04-27 22:38:18.324146810 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1220,
  /**/

-- 
The question is:  What do you do with your life?
The wrong answer is: Become the richest guy in the graveyard.
(billionaire and Oracle founder Larry Ellison)

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1221
Problem:Filtering does not work when listing marks.
Solution:   Implement filtering marks. (Marcin Szamotulski, closes #3895)
Files:  runtime/doc/various.txt, src/mark.c,
src/testdir/test_filter_cmd.vim


*** ../vim-8.1.1220/runtime/doc/various.txt 2019-04-27 13:03:20.012715914 
+0200
--- runtime/doc/various.txt 2019-04-27 22:29:37.358502260 +0200
***
*** 573,589 
the output, not necessarily the whole line. Only some
commands support filtering, try it out to check if it
works. Some of the commands that support filtering:
!   |:#|  - filter whole line
!   |:command|- filter by command name
!   |:files|  - filter by file name
!   |:highlight|  - filter by highlight group
!   |:jumps|  - filter by file name
!   |:let|- filter by variable name
!   |:list|   - filter whole line
!   |:llist|  - filter by file name or module name
!   |:oldfiles|   - filter by file name
!   |:clist|  - filter by file name or module name
!   |:set|- filter by variable name
  
Only normal messages are filtered, error messages are
not.
--- 571,589 
the output, not necessarily the whole line. Only some
commands support filtering, try it out to check if it
works. Some of the commands that support filtering:
!  |:#|  - filter whole line
!  |:clist|  - filter by file name or module name
!  |:command|- filter by command name
!  |:files|  - filter by file name
!  |:highlight|  - filter by highlight group
!  |:jumps|  - filter by file name
!  |:let|- filter by variable name
!  |:list|   - filter whole line
!  |:llist|  - filter by file name or module name
!  |:marks|  - filter by text in the current file,
!  or file name for other files
!  |:oldfiles|   - filter by file name
!  |:set|- filter by variable name
  
Only normal messages are filtered, error messages are
not.
*** ../vim-8.1.1220/src/mark.c  2019-01-27 15:07:35.161741346 +0100
--- src/mark.c  2019-04-27 22:28:39.730756612 +0200
***
*** 744,754 
  int   c,
  char_u*arg,
  pos_T *p,
! char_u*name,
  int   current)/* in current file */
  {
  static intdid_title = FALSE;
  int   mustfree = FALSE;
  
  if (c == -1)  /* finish up */
  {
--- 744,755 
  int   c,
  char_u*arg,
  pos_T *p,
! char_u*name_arg,
  int   current)/* in current file */
  {
  static intdid_title = FALSE;
  int   mustfree = FALSE;
+ char_u*name = name_arg;
  
  if (c == -1)  /* finish up */
  {
***
*** 762,796 
semsg(_("E283: No marks matching \"%s\""), arg);
}
  }
! /* don't output anything if 'q' typed at --more-- prompt */
  else if (!got_int
&& (arg == NULL || vim_strchr(arg, c) != NULL)
&& p->lnum != 0)
  {
!   if (!did_title)
{
!   /* Highlight title */
!   msg_puts_title(_("\nmark line  col file/text"));
!   did_title = TRUE;
}
!   msg_putchar('\n');
!   if (!got_int)
{
!   sprintf((char *)IObuff, " %c %6ld %4d ", c, p->lnum, p->col);
!   msg_outtrans(IObuff);
!   if (name == NULL && current)
{
!   name = mark_line(p, 15);
!   mustfree = TRUE;
}
!   if (name != NULL)
{
!   msg_outtrans_attr(name, current ? HL_ATTR(HLF_D) : 0);
!   if (mustfree)
!   vim_free(name);
}
}
!   out_flush();/* show one line at a time */
  }
  }
  
--- 763,800 
semsg(_("E283: No marks matching \"%s\""), arg);
}
  }
! // don't output anything if 'q' typed at --more-- prompt
  else if (!got_int
&& (arg == NULL || vim_strchr(arg, c) != NULL)
&& p->lnum != 0)
  {
!   if (name == NULL && current)
{
!  

Patch 8.1.1219

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1219
Problem:Not checking for NULL return from alloc().
Solution:   Add checks. (Martin Kunev, closes #4303, closes #4174)
Files:  src/beval.c, src/blowfish.c, src/crypt.c, src/crypt_zip.c,
src/ops.c, src/option.c, src/popupmnu.c, src/proto/blowfish.pro,
src/proto/crypt_zip.pro, src/gui_gtk_f.c, src/gui_gtk_x11.c,
src/libvterm/src/state.c, src/libvterm/src/termscreen.c


*** ../vim-8.1.1218/src/beval.c 2019-01-17 15:43:21.753878419 +0100
--- src/beval.c 2019-04-27 21:44:39.226975332 +0200
***
*** 127,132 
--- 127,134 
  #ifdef FEAT_VARTABS
vim_free(beval->vts);
beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array);
+   if (wp->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
+   return FAIL;
  #endif
beval->ts = wp->w_buffer->b_p_ts;
return OK;
*** ../vim-8.1.1218/src/blowfish.c  2019-02-17 17:44:36.199875566 +0100
--- src/blowfish.c  2019-04-27 21:36:48.073670930 +0200
***
*** 636,642 
  }
  }
  
! void
  crypt_blowfish_init(
  cryptstate_T  *state,
  char_u*   key,
--- 636,642 
  }
  }
  
! int
  crypt_blowfish_init(
  cryptstate_T  *state,
  char_u*   key,
***
*** 647,652 
--- 647,654 
  {
  bf_state_T*bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T));
  
+ if (bfs == NULL)
+   return FAIL;
  state->method_state = bfs;
  
  /* "blowfish" uses a 64 byte buffer, causing it to repeat 8 byte groups 8
***
*** 654,663 
  bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK;
  
  if (blowfish_self_test() == FAIL)
!   return;
  
  bf_key_init(bfs, key, salt, salt_len);
  bf_cfb_init(bfs, seed, seed_len);
  }
  
  /*
--- 656,667 
  bfs->cfb_len = state->method_nr == CRYPT_M_BF ? BF_MAX_CFB_LEN : BF_BLOCK;
  
  if (blowfish_self_test() == FAIL)
!   return FAIL;
  
  bf_key_init(bfs, key, salt, salt_len);
  bf_cfb_init(bfs, seed, seed_len);
+ 
+ return OK;
  }
  
  /*
*** ../vim-8.1.1218/src/crypt.c 2019-04-21 00:00:07.942354840 +0200
--- src/crypt.c 2019-04-27 21:38:11.065263015 +0200
***
*** 43,49 
  int (* self_test_fn)();
  
  // Function pointer for initializing encryption/decryption.
! void (* init_fn)(cryptstate_T *state, char_u *key,
  char_u *salt, int salt_len, char_u *seed, int seed_len);
  
  /* Function pointers for encoding/decoding from one buffer into another.
--- 43,49 
  int (* self_test_fn)();
  
  // Function pointer for initializing encryption/decryption.
! int (* init_fn)(cryptstate_T *state, char_u *key,
  char_u *salt, int salt_len, char_u *seed, int seed_len);
  
  /* Function pointers for encoding/decoding from one buffer into another.
***
*** 243,248 
--- 243,249 
  
  /*
   * Allocate a crypt state and initialize it.
+  * Return NULL for failure.
   */
  cryptstate_T *
  crypt_create(
***
*** 255,262 
  {
  cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T));
  
  state->method_nr = method_nr;
! cryptmethods[method_nr].init_fn(state, key, salt, salt_len, seed, 
seed_len);
  return state;
  }
  
--- 256,271 
  {
  cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T));
  
+ if (state == NULL)
+   return state;
+ 
  state->method_nr = method_nr;
! if (cryptmethods[method_nr].init_fn(
!  state, key, salt, salt_len, seed, seed_len) == FAIL)
! {
! vim_free(state);
! return NULL;
! }
  return state;
  }
  
*** ../vim-8.1.1218/src/crypt_zip.c 2019-03-30 18:46:57.340077448 +0100
--- src/crypt_zip.c 2019-04-27 21:39:16.576855289 +0200
***
*** 78,84 
  /*
   * Initialize for encryption/decryption.
   */
! void
  crypt_zip_init(
  cryptstate_T*state,
  char_u*key,
--- 78,84 
  /*
   * Initialize for encryption/decryption.
   */
! int
  crypt_zip_init(
  cryptstate_T*state,
  char_u*key,
***
*** 91,96 
--- 91,98 
  zip_state_T   *zs;
  
  zs = (zip_state_T *)alloc(sizeof(zip_state_T));
+ if (zs == NULL)
+   return FAIL;
  state->method_state = zs;
  
  make_crc_tab();
***
*** 99,104 
--- 101,108 
  zs->keys[2] = 878082192L;
  for (p = key; *p != NUL; ++p)
UPDATE_KEYS_ZIP(zs->keys, (int)*p);
+ 
+ return OK;
  }
  
  /*
*** ../vim-8.1.1218/src/ops.c   2019-03-30 18:46:57.356077354 +0100
--- src/ops.c   2019-04-27 21:43:12.119465720 +0200
***
*** 6170,6190 
  y_ptr->y_size = linecount;
  y_ptr->y_time_set = timestamp;
  if (linecount == 0)
y_ptr->y_array = NULL;
! 

Patch 8.1.1218

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1218
Problem:Cannot set a directory for a tab page.
Solution:   Add the tab-local directory. (Yegappan Lakshmanan, closes #4212)
Files:  runtime/doc/autocmd.txt, runtime/doc/editing.txt,
runtime/doc/eval.txt, runtime/doc/index.txt,
runtime/doc/options.txt, runtime/doc/usr_22.txt,
runtime/doc/usr_41.txt, src/eval.c, src/evalfunc.c,
src/ex_cmdidxs.h, src/ex_cmds.h, src/ex_docmd.c, src/if_py_both.h,
src/proto/eval.pro, src/proto/ex_docmd.pro, src/structs.h,
src/testdir/test_getcwd.vim, src/testdir/test_mksession.vim,
src/window.c


*** ../vim-8.1.1217/runtime/doc/autocmd.txt 2019-04-08 18:15:36.464223229 
+0200
--- runtime/doc/autocmd.txt 2019-04-27 20:06:26.758264881 +0200
***
*** 686,704 
change or when doing |:diffupdate|.
*DirChanged*
  DirChangedThe working directory has changed in response
!   to the |:cd| or |:lcd| commands, or as a
!   result of the 'autochdir' option.
The pattern can be:
!   "window" to trigger on `:lcd`
!   "global" to trigger on `:cd`
!   "auto"   to trigger on 'autochdir'.
!   "drop"   to trigger on editing a file
 is set to the new directory name.
*ExitPre*
  ExitPre   When using `:quit`, `:wq` in a way it 
makes
Vim exit, or using `:qall`, just after
|QuitPre|.  Can be used to close any
!   non-essential window.
*FileChangedShell*
  FileChangedShell  When Vim notices that the modification time of
a file has changed since editing started.
--- 690,712 
change or when doing |:diffupdate|.
*DirChanged*
  DirChangedThe working directory has changed in response
!   to the |:cd| or |:tcd| or |:lcd| commands, or
!   as a result of the 'autochdir' option.
The pattern can be:
!   "window"  to trigger on `:lcd`
!   "tabpage" to trigger on `:tcd`
!   "global"  to trigger on `:cd`
!   "auto"to trigger on 'autochdir'.
!   "drop"to trigger on editing a file
 is set to the new directory name.
*ExitPre*
  ExitPre   When using `:quit`, `:wq` in a way it 
makes
Vim exit, or using `:qall`, just after
|QuitPre|.  Can be used to close any
!   non-essential window.  Exiting may still be
!   cancelled if there is a modified buffer that
!   isn't automatically saved, use |VimLeavePre|
!   for really exiting.
*FileChangedShell*
  FileChangedShell  When Vim notices that the modification time of
a file has changed since editing started.
*** ../vim-8.1.1217/runtime/doc/editing.txt 2018-05-17 13:40:51.0 
+0200
--- runtime/doc/editing.txt 2019-04-27 20:11:37.192857657 +0200
***
*** 1304,1312 
  ==
  7. The current directory  *current-directory*
  
! You may use the |:cd| and |:lcd| commands to change to another directory, so
! you will not have to type that directory name in front of the file names.  It
! also makes a difference for executing external commands, e.g. ":!ls".
  
  Changing directory fails when the current buffer is modified, the '.' flag is
  present in 'cpoptions' and "!" is not used in the command.
--- 1304,1313 
  ==
  7. The current directory  *current-directory*
  
! You can use the |:cd|, |:tcd| and |:lcd| commands to change to another
! directory, so you will not have to type that directory name in front of the
! file names.  It also makes a difference for executing external commands, e.g.
! ":!ls".
  
  Changing 

Patch 8.1.1217

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1217
Problem:MS-Windows: no space reserved for font quality name.
Solution:   Add quality_name length if present. (Ken Takata, closes #4311)
Files:  src/gui_w32.c


*** ../vim-8.1.1216/src/gui_w32.c   2019-04-02 22:15:51.344273531 +0200
--- src/gui_w32.c   2019-04-27 19:13:24.605478533 +0200
***
*** 3127,3133 
  quality_name = quality_id2name((int)lf.lfQuality);
  
  res = (char *)alloc((unsigned)(strlen(font_name) + 20
!   + (charset_name == NULL ? 0 : strlen(charset_name) + 2)));
  if (res != NULL)
  {
p = res;
--- 3127,3134 
  quality_name = quality_id2name((int)lf.lfQuality);
  
  res = (char *)alloc((unsigned)(strlen(font_name) + 20
!   + (charset_name == NULL ? 0 : strlen(charset_name) + 2)
!   + (quality_name == NULL ? 0 : strlen(quality_name) + 2)));
  if (res != NULL)
  {
p = res;
*** ../vim-8.1.1216/src/version.c   2019-04-27 19:11:31.346034085 +0200
--- src/version.c   2019-04-27 19:15:02.161000938 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1217,
  /**/

-- 
Vim is like Emacs without all the typing.  (John "Johann" Spetz)

 /// 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: Jumping to the next/prev quickfix entry relative to the current file

2019-04-27 Fir de Conversatie Bram Moolenaar


Yegappan wrote:

> I came across the following threads that discuss about the need
> for a command to jump to the next quickfix entry relative to the
> current file:
> 
> https://vi.stackexchange.com/questions/14356/go-to-quickfix-next-previous-cnext-cprevious-relative-to-current-file-position/14359#14359
> 
> https://www.reddit.com/r/vim/comments/bhpv0f/using_vimgrepquickfix_window_as_filter_from/
> 
> I think we can add :cfnext and :cfprev commands that jump to the
> quickfix entry relative to the current file. We will also need corresponding
> :lfnext and :lfprev commands for the location list. If the current file
> doesn't have any associated quickfix entry, then these commands will
> not move the cursor.
> 
> An alternative approach is to add a :cfjump command that jumps to
> the quickfix entry nearest to the current line in the current file.
> 
> Any comments/suggestions on these new commands?

Sounds useful.  I sometimes grep to find matches, then move around.
Currently I would search for the same pattern, having a command would be
helpful.

To be clear: the commands would jumpt to the next (or previous) quickfix
entry relative to the cursor position.

For the command names: how about :cabove and :cbelow ?
I find "cfnext" cryptic, it's too much like ":cnext" and can be confused
with "cnfile"



-- 
A computer programmer is a device for turning requirements into
undocumented features.  It runs on cola, pizza and Dilbert cartoons.
Bram Moolenaar

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1216
Problem:Mouse middle click is not tested.
Solution:   Add a test. (Dominique Pelle, closes #4310)
Files:  src/testdir/test_termcodes.vim


*** ../vim-8.1.1215/src/testdir/test_termcodes.vim  2019-04-17 
17:08:22.896875152 +0200
--- src/testdir/test_termcodes.vim  2019-04-27 19:09:47.706543703 +0200
***
*** 26,35 
--- 26,43 
call TerminalEscapeCode(0x20, 0, a:row, a:col, 'M')
  endfunc
  
+ func MouseMiddleClick(row, col)
+   call TerminalEscapeCode(0x21, 1, a:row, a:col, 'M')
+ endfunc
+ 
  func MouseLeftRelease(row, col)
call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
  endfunc
  
+ func MouseMiddleRelease(row, col)
+   call TerminalEscapeCode(0x23, 3, a:row, a:col, 'm')
+ endfunc
+ 
  func MouseLeftDrag(row, col)
call TerminalEscapeCode(0x43, 0x20, a:row, a:col, 'M')
  endfunc
***
*** 42,48 
call TerminalEscapeCode(0x41, 0x41, a:row, a:col, 'M')
  endfunc
  
! func Test_xterm_mouse_click()
new
let save_mouse = 
let save_term = 
--- 50,56 
call TerminalEscapeCode(0x41, 0x41, a:row, a:col, 'M')
  endfunc
  
! func Test_xterm_mouse_left_click()
new
let save_mouse = 
let save_term = 
***
*** 68,73 
--- 76,123 
bwipe!
  endfunc
  
+ func Test_xterm_mouse_middle_click()
+   new
+   let save_mouse = 
+   let save_term = 
+   let save_ttymouse = 
+   let save_quotestar = @*
+   let @* = 'abc'
+   set mouse=a term=xterm
+ 
+   for ttymouse_val in ['xterm2', 'sgr']
+ let msg = 'ttymouse=' .. ttymouse_val
+ exe 'set ttymouse=' . ttymouse_val
+ call setline(1, ['123456789', '123456789'])
+ 
+ " Middle-click in the middle of the line pastes text where clicked.
+ let row = 1
+ let col = 6
+ call MouseMiddleClick(row, col)
+ call MouseMiddleRelease(row, col)
+ call assert_equal(['12345abc6789', '123456789'], getline(1, '$'), msg)
+ 
+ " Middle-click beyond end of the line pastes text at the end of the line.
+ let col = 20
+ call MouseMiddleClick(row, col)
+ call MouseMiddleRelease(row, col)
+ call assert_equal(['12345abc6789abc', '123456789'], getline(1, '$'), msg)
+ 
+ " Middle-click beyond the last line pastes in the last line.
+ let row = 5
+ let col = 3
+ call MouseMiddleClick(row, col)
+ call MouseMiddleRelease(row, col)
+ call assert_equal(['12345abc6789abc', '12abc3456789'], getline(1, '$'), 
msg)
+   endfor
+ 
+   let  = save_mouse
+   let  = save_term
+   let  = save_ttymouse
+   let @* = save_quotestar
+   bwipe!
+ endfunc
+ 
  func Test_xterm_mouse_wheel()
new
let save_mouse = 
*** ../vim-8.1.1215/src/version.c   2019-04-27 18:32:27.821786738 +0200
--- src/version.c   2019-04-27 19:10:36.410304033 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1216,
  /**/

-- 
ARTHUR:  Well, I AM king...
DENNIS:  Oh king, eh, very nice.  An' how'd you get that, eh?  By exploitin'
 the workers -- by 'angin' on to outdated imperialist dogma which
 perpetuates the economic an' social differences in our society!  If
 there's ever going to be any progress--
  The Quest for the Holy Grail (Monty Python)

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


Jumping to the next/prev quickfix entry relative to the current file

2019-04-27 Fir de Conversatie Yegappan Lakshmanan
Hi all,

I came across the following threads that discuss about the need
for a command to jump to the next quickfix entry relative to the
current file:

https://vi.stackexchange.com/questions/14356/go-to-quickfix-next-previous-cnext-cprevious-relative-to-current-file-position/14359#14359

https://www.reddit.com/r/vim/comments/bhpv0f/using_vimgrepquickfix_window_as_filter_from/

I think we can add :cfnext and :cfprev commands that jump to the
quickfix entry relative to the current file. We will also need corresponding
:lfnext and :lfprev commands for the location list. If the current file
doesn't have any associated quickfix entry, then these commands will
not move the cursor.

An alternative approach is to add a :cfjump command that jumps to
the quickfix entry nearest to the current line in the current file.

Any comments/suggestions on these new commands?

Thanks,
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.
For more options, visit https://groups.google.com/d/optout.


Patch 8.1.1215

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1215
Problem:"make clean" does not remove generated src/po files.
Solution:   Remove the files for "make clean". (Christian Brabandt)
Files:  src/po/Makefile


*** ../vim-8.1.1214/src/po/Makefile 2019-04-11 18:41:07.608867036 +0200
--- src/po/Makefile 2019-04-27 18:26:10.203608322 +0200
***
*** 151,156 
--- 151,157 
  
  clean: checkclean
rm -f core core.* *.old.po *.mo *.pot sjiscorr
+   rm -f LINGUAS vim.desktop gvim.desktop
  
  distclean: clean
  
*** ../vim-8.1.1214/src/version.c   2019-04-27 18:00:29.855064546 +0200
--- src/version.c   2019-04-27 18:29:58.566503922 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1215,
  /**/

-- 
A mathematician is a device for turning coffee into theorems.
Paul Erdos
A computer programmer is a device for turning coffee into bugs.
Bram Moolenaar

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1214
Problem:Old style tests.
Solution:   Move tests from test14 to new style test files. (Yegappan
Lakshmanan, closes #4308)
Files:  src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
src/testdir/test14.in, src/testdir/test14.ok,
src/testdir/test_edit.vim, src/testdir/test_normal.vim,
src/testdir/test_search.vim, src/testdir/test_substitute.vim,
src/testdir/test_visual.vim


*** ../vim-8.1.1213/src/Makefile2019-04-27 13:03:20.000715982 +0200
--- src/Makefile2019-04-27 17:35:39.801824116 +0200
***
*** 2175,2181 
  # These do not depend on the executable, compile it when needed.
  test1 \
test_eval \
!   test3 test14 test17 \
test29 test30 test37 test39 \
test42 test44 test48 test49 \
test52 test59 \
--- 2175,2181 
  # These do not depend on the executable, compile it when needed.
  test1 \
test_eval \
!   test3 test17 \
test29 test30 test37 test39 \
test42 test44 test48 test49 \
test52 test59 \
*** ../vim-8.1.1213/src/testdir/Make_all.mak2019-04-25 20:28:53.327979592 
+0200
--- src/testdir/Make_all.mak2019-04-27 17:35:39.801824116 +0200
***
*** 14,20 
  # Tests that run on all systems.
  SCRIPTS_ALL = \
test3.out \
-   test14.out \
test29.out \
test37.out \
test39.out \
--- 14,19 
*** ../vim-8.1.1213/src/testdir/Make_vms.mms2019-04-25 20:28:53.327979592 
+0200
--- src/testdir/Make_vms.mms2019-04-27 17:35:39.805824096 +0200
***
*** 74,80 
  .SUFFIXES : .out .in
  
  SCRIPT = test1.out test3.out \
-test14.out \
 test29.out \
 test30.out test37.out test39.out \
 test42.out test44.out test48.out test49.out \
--- 74,79 
*** ../vim-8.1.1213/src/testdir/test14.in   2017-03-08 22:48:59.0 
+0100
--- src/testdir/test14.in   1970-01-01 01:00:00.0 +0100
***
*** 1,100 
- Tests for "vaBiB", end could be wrong.
- Also test ":s/pat/sub/" with different ~s in sub.
- Also test for ^Vxff and ^Vo123 in Insert mode.
- Also test "[m", "]m", "[M" and "]M"
- Also test search()
- 
- STARTTEST
- :so small.vim
- :set belloff=all
- /Start cursor here
- vaBiBD:?Bug?,/Piece/-2w! test.out
- /^- Bug
- :s/u/~u~/
- :s/i/~u~/
- :s/o/~~~/
- :.w >>test.out
- :if has("ebcdic")
- : let tt = "o\193\xc2\o303 \90a\xfg\o578\"
- :else
- : let tt = "o\65\x42\o103 \33a\xfg\o78\"
- :endif
- :exe "normal " . tt
- :unlet tt
- :.w >>test.out
- :set vb
- /^Piece
- 2]maA :.w >>test.out
- j]maB :.w >>test.out
- ]maC :.w >>test.out
- [maD :.w >>test.out
- k2[maE :.w >>test.out
- 3[maF :.w >>test.out
- ]MaG :.w >>test.out
- j2]MaH :.w >>test.out
- ]M]MaI :.w >>test.out
- 2[MaJ :.w >>test.out
- k[MaK :.w >>test.out
- 3[MaL :.w >>test.out
- :"
- /^foobar
- :let startline = line('.')
- :call search('foobar', 'c')
- :call append(line('$'), line('.') - startline)
- j:call search('^$', 'c')
- :call append(line('$'), line('.') - startline)
- :call search('^$', 'bc')
- :call append(line('$'), line('.') - startline)
- /two
- :call search('.', 'c')
- :call append(line('$'), getline('.')[col('.') - 1:])
- :"
- /^substitute
- :s/foo/bar/
- :$put =@/
- /^substitute
- :keeppatterns s/asdf/xyz/
- :$put =@/
- /^substitute
- Y:$put =@0
- /bar /e
- :$put =@0
- -:keeppatterns /xyz
- 0dn:/^search()/,$w >>test.out
- :qa!
- ENDTEST
- 
- - Bug in "v" on this text (Webb):
-   {
-   cmd;
-   {
-   cmd;/* <-- Start cursor here */
-   {
-   }
-   }
-   }
- 
- Piece of Java
- {
-   tt m1 {
-   t1;
-   } e1
- 
-   tt m2 {
-   t2;
-   } e2
- 
-   tt m3 {
-   if (x)
-   {
-   t3;
-   }
-   } e3
- }
- 
- foobar
- 
- substitute foo asdf
- 
- one two
- search()
--- 0 
*** ../vim-8.1.1213/src/testdir/test14.ok   2014-01-14 21:16:23.0 
+0100
--- src/testdir/test14.ok   1970-01-01 01:00:00.0 +0100
***
*** 1,26 
- - Bug in "v" on this text (Webb):
-   {
-   }
- - Bug uuun "v" un this text (Webb):
- ABC !a g 8
-   tt m1 {A
-   tt m2 {B
-   tt m3 {C
-   tt m3 {DC
-   tt m1 {EA
- {F
-   }G e1
-   }H e3
- }I
-   }JH e3
-   }K e2
- {LF
- search()
- 0
- 1
- 1
- two
- foo
- ^substitute
- substitute bar xyz
- xyz
--- 0 
*** ../vim-8.1.1213/src/testdir/test_edit.vim   2019-03-16 18:11:03.646997858 
+0100
--- src/testdir/test_edit.vim   2019-04-27 17:35:39.805824096 +0200
***
*** 1447,1449 
--- 1447,1465 
au! InsertLeave
iunmap x
  endfunc
+ 
+ " Test for inserting characters using CTRL-V followed by a number.
+ func Test_edit_special_chars()
+   new
+ 
+   if has("ebcdic")
+ let t = 

Patch 8.1.1213

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1213
Problem:"make clean" in top dir does not cleanup indent test output.
Solution:   Clean the indent test output.  Do not rely on the vim executable
for that. (closes #4307)
Files:  Makefile, runtime/indent/Makefile,
runtime/indent/testdir/cleantest.vim


*** ../vim-8.1.1212/Makefile2019-01-10 21:49:51.982405995 +0100
--- Makefile2019-04-27 17:49:00.718230799 +0200
***
*** 43,55 
@if test "$@" = "test"; then \
$(MAKE) indenttest; \
fi
  
  # Executable used for running the indent tests.
  VIM_FOR_INDENTTEST = ../../src/vim
  
  indenttest:
cd runtime/indent && \
!   $(MAKE) clean VIM="$(VIM_FOR_INDENTTEST)" && \
$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"

  
--- 43,60 
@if test "$@" = "test"; then \
$(MAKE) indenttest; \
fi
+   @# When the target is "clean" also clean for the indent tests.
+   @if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; 
then \
+   cd runtime/indent && \
+   $(MAKE) clean; \
+   fi
  
  # Executable used for running the indent tests.
  VIM_FOR_INDENTTEST = ../../src/vim
  
  indenttest:
cd runtime/indent && \
!   $(MAKE) clean && \
$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"

  
*** ../vim-8.1.1212/runtime/indent/Makefile 2018-12-10 21:36:52.869487030 
+0100
--- runtime/indent/Makefile 2019-04-27 17:53:53.928891963 +0200
***
*** 11,14 
  
  
  clean:
!   VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u 
testdir/cleantest.vim
--- 11,14 
  
  
  clean:
!   rm -f testdir/*.fail testdir/*.out
*** ../vim-8.1.1212/runtime/indent/testdir/cleantest.vim2018-12-15 
17:43:38.870899928 +0100
--- runtime/indent/testdir/cleantest.vim1970-01-01 01:00:00.0 
+0100
***
*** 1,11 
- " Only do this with the +eval feature
- if 1
- 
-   " Deletes all the test output files: *.fail and *.out
-   for fname in glob('testdir/*.out', 1, 1) + glob('testdir/*.fail', 1, 1)
- call delete(fname)
-   endfor
- 
- endif
- 
- quit
--- 0 
*** ../vim-8.1.1212/src/version.c   2019-04-27 17:32:36.390686708 +0200
--- src/version.c   2019-04-27 17:56:54.892058689 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1213,
  /**/

-- 
[clop clop]
ARTHUR:  Old woman!
DENNIS:  Man!
ARTHUR:  Man, sorry.  What knight lives in that castle over there?
DENNIS:  I'm thirty seven.
ARTHUR:  What?
DENNIS:  I'm thirty seven -- I'm not old!
  The Quest for the Holy Grail (Monty Python)

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1212
Problem:Signal PWR is not tested.
Solution:   Test that PWR updates the swap file. (Dominique Pelle,
closes #4312)
Files:  src/testdir/test_signals.vim


*** ../vim-8.1.1211/src/testdir/test_signals.vim2019-04-02 
21:45:38.260326643 +0200
--- src/testdir/test_signals.vim2019-04-27 17:30:53.055172109 +0200
***
*** 4,21 
finish
  endif
  
- if has('gui_running')
-   " Signals only work for terminals, and won't work for GUI.
-   finish
- endif
- 
  source shared.vim
  
  " Test signal WINCH (window resize signal)
  func Test_signal_WINCH()
!   let signals = system('kill -l')
!   if signals !~ '\'
! " signal WINCH is not available, skip the test.
  return
endif
  
--- 4,20 
finish
  endif
  
  source shared.vim
  
+ " Check whether a signal is available on this system.
+ func HasSignal(signal)
+   let signals = system('kill -l')
+   return signals =~# '\<' .. a:signal .. '\>'
+ endfunc
+ 
  " Test signal WINCH (window resize signal)
  func Test_signal_WINCH()
!   if has('gui_running') || !HasSignal('WINCH')
  return
endif
  
***
*** 31,45 
let new_lines =  - 2
let new_columns =  - 2
  
!   exe 'set lines=' . new_lines
!   exe 'set columns=' . new_columns
call assert_equal(new_lines, )
call assert_equal(new_columns, )
  
" Send signal and wait for signal to be processed.
" 'lines' and 'columns' should have been restored
" after handing signal WINCH.
!   exe 'silent !kill -s WINCH ' . getpid()
call WaitForAssert({-> assert_equal(old_lines, )})
call assert_equal(old_columns, )
  
--- 30,44 
let new_lines =  - 2
let new_columns =  - 2
  
!   exe 'set lines=' .. new_lines
!   exe 'set columns=' .. new_columns
call assert_equal(new_lines, )
call assert_equal(new_columns, )
  
" Send signal and wait for signal to be processed.
" 'lines' and 'columns' should have been restored
" after handing signal WINCH.
!   exe 'silent !kill -s WINCH ' .. getpid()
call WaitForAssert({-> assert_equal(old_lines, )})
call assert_equal(old_columns, )
  
***
*** 47,49 
--- 46,77 
  let _WS = old_WS
endif
  endfunc
+ 
+ " Test signal PWR, which should update the swap file.
+ func Test_signal_PWR()
+   if !HasSignal('PWR')
+ return
+   endif
+ 
+   " Set a very large 'updatetime' and 'updatecount', so that we can be sure
+   " that swap file is updated as a result of sending PWR signal, and not
+   " because of exceeding 'updatetime' or 'updatecount' when changing buffer.
+   set updatetime=10 updatecount=10
+   new Xtest_signal_PWR
+   let swap_name = swapname('%')
+   call setline(1, '123')
+   preserve
+   let swap_content = readfile(swap_name, 'b')
+ 
+   " Update the buffer and check that the swap file is not yet updated,
+   " since we set 'updatetime' and 'updatecount' to large values.
+   call setline(1, 'abc')
+   call assert_equal(swap_content, readfile(swap_name, 'b'))
+ 
+   " Sending PWR signal should update the swap file.
+   exe 'silent !kill -s PWR ' .. getpid()
+   call WaitForAssert({-> assert_notequal(swap_content, readfile(swap_name, 
'b'))})
+ 
+   bwipe!
+   set updatetime& updatecount&
+ endfunc
*** ../vim-8.1.1211/src/version.c   2019-04-27 15:05:04.528816589 +0200
--- src/version.c   2019-04-27 17:31:56.794872746 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1212,
  /**/

-- 
CUSTOMER: You're not fooling anyone y'know.  Look, isn't there something
  you can do?
DEAD PERSON:  I feel happy... I feel happy.
[whop]
CUSTOMER: Ah, thanks very much.
MORTICIAN:Not at all.  See you on Thursday.
CUSTOMER: Right.
  The Quest for the Holy Grail (Monty Python)

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1211
Problem:Not all user command code is tested.
Solution:   Add more tests.
Files:  src/testdir/test_usercommands.vim


*** ../vim-8.1.1210/src/testdir/test_usercommands.vim   2019-04-25 
22:42:02.313959805 +0200
--- src/testdir/test_usercommands.vim   2019-04-27 15:04:04.256811206 +0200
***
*** 73,78 
--- 73,169 
unlet g:mods
  endfunction
  
+ func SaveCmdArgs(...)
+   let g:args = a:000
+ endfunc
+ 
+ func Test_f_args()
+   command -nargs=* TestFArgs call SaveCmdArgs()
+ 
+   TestFArgs
+   call assert_equal([], g:args)
+ 
+   TestFArgs one two three
+   call assert_equal(['one', 'two', 'three'], g:args)
+ 
+   TestFArgs one\\two three
+   call assert_equal(['one\two', 'three'], g:args)
+ 
+   TestFArgs one\ two three
+   call assert_equal(['one two', 'three'], g:args)
+ 
+   TestFArgs one\"two three
+   call assert_equal(['one\"two', 'three'], g:args)
+ 
+   delcommand TestFArgs
+ endfunc
+ 
+ func Test_q_args()
+   command -nargs=* TestQArgs call SaveCmdArgs()
+ 
+   TestQArgs
+   call assert_equal([''], g:args)
+ 
+   TestQArgs one two three
+   call assert_equal(['one two three'], g:args)
+ 
+   TestQArgs one\\two three
+   call assert_equal(['one\\two three'], g:args)
+ 
+   TestQArgs one\ two three
+   call assert_equal(['one\ two three'], g:args)
+ 
+   TestQArgs one\"two three
+   call assert_equal(['one\"two three'], g:args)
+ 
+   delcommand TestQArgs
+ endfunc
+ 
+ func Test_reg_arg()
+   command -nargs=* -reg TestRegArg call SaveCmdArgs("", "")
+ 
+   TestRegArg
+   call assert_equal(['', ''], g:args)
+ 
+   TestRegArg x
+   call assert_equal(['x', 'x'], g:args)
+ 
+   delcommand TestRegArg
+ endfunc
+ 
+ func Test_no_arg()
+   command -nargs=* TestNoArg call SaveCmdArgs("", "<>", "", "")
+ 
+   TestNoArg
+   call assert_equal(['', '<>', '', '<'], g:args)
+ 
+   TestNoArg one
+   call assert_equal(['one', '<>', '', '<'], g:args)
+ 
+   delcommand TestNoArg
+ endfunc
+ 
+ func Test_range_arg()
+   command -range TestRangeArg call SaveCmdArgs(, , )
+   new
+   call setline(1, range(100))
+   let lnum = line('.')
+ 
+   TestRangeArg
+   call assert_equal([0, lnum, lnum], g:args)
+ 
+   99TestRangeArg
+   call assert_equal([1, 99, 99], g:args)
+ 
+   88,99TestRangeArg
+   call assert_equal([2, 88, 99], g:args)
+ 
+   call assert_fails('102TestRangeArg', 'E16:')
+ 
+   bwipe!
+   delcommand TestRangeArg
+ endfunc
+ 
  func Test_Ambiguous()
command Doit let g:didit = 'yes'
command Dothat let g:didthat = 'also'
***
*** 88,93 
--- 179,186 
Do
call assert_equal('also', g:didthat)
delcommand Dothat
+ 
+   call assert_fails("\x4ei\041", ' you demand a ')
  endfunc
  
  func Test_redefine_on_reload()
***
*** 139,144 
--- 232,238 
call assert_fails('com! - DoCmd :', 'E175:')
call assert_fails('com! -xxx DoCmd :', 'E181:')
call assert_fails('com! -addr DoCmd :', 'E179:')
+   call assert_fails('com! -addr=asdf DoCmd :', 'E180:')
call assert_fails('com! -complete DoCmd :', 'E179:')
call assert_fails('com! -complete=xxx DoCmd :', 'E180:')
call assert_fails('com! -complete=custom DoCmd :', 'E467:')
*** ../vim-8.1.1210/src/version.c   2019-04-27 13:03:20.012715914 +0200
--- src/version.c   2019-04-27 14:03:48.652580023 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1211,
  /**/

-- 
DEAD PERSON:  I don't want to go in the cart!
CUSTOMER: Oh, don't be such a baby.
MORTICIAN:I can't take him...
DEAD PERSON:  I feel fine!
CUSTOMER: Oh, do us a favor...
MORTICIAN:I can't.
  The Quest for the Holy Grail (Monty Python)

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


About {not in Vi} and option defaults

2019-04-27 Fir de Conversatie Tony Mechelynck
Looking at the help for the 'tagcase' option today, I was surprised to see both
{not in Vi}
and
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.

This looks confusing to me (and I suspect that other options are
similarly described). OK, so what is "the Vi default" for something
which is {not in Vi}? Empty? "match"? Unchanged (since it is
irrelevant to Vi)? IMHO it would be clearer to say plainly to what
exact value ":set compatible" sets this option.

BTW, if someday (as seems probable) all mention of {not in Vi}
disappears from options.txt (and goes e.g. to vi_diff.txt), it will
become even more confusing, because the help text of course mentions
no "Vi default value" for stuff which is {not in Vi}.

Best regards,
Tony.

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

2019-04-27 Fir de Conversatie Bram Moolenaar


Patch 8.1.1210
Problem:Support for user commands is spread out. No good reason to make
user commands optional.
Solution:   Move user command support to usercmd.c.  Always enable the
user_commands feature.
Files:  src/usercmd.c, src/proto/usercmd.pro, Filelist, src/Make_bc5.mak,
src/Make_cyg_ming.mak, src/Make_dice.mak, src/Make_ivc.mak,
src/Make_manx.mak, src/Make_morph.mak, src/Make_mvc.mak,
src/Make_sas.mak, src/Make_vms.mms, src/Makefile, src/README.md,
src/buffer.c, src/eval.c, src/evalfunc.c, src/ex_cmds.h,
src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_getln.c,
src/feature.h, src/macros.h, src/misc2.c, src/proto.h,
src/structs.h, src/version.c, runtime/doc/eval.txt,
runtime/doc/various.txt


*** ../vim-8.1.1209/src/usercmd.c   2019-04-27 12:58:18.994395422 +0200
--- src/usercmd.c   2019-04-27 12:54:00.423836989 +0200
***
*** 0 
--- 1,1656 
+ /* vi:set ts=8 sts=4 sw=4 noet:
+  *
+  * VIM - Vi IMproved  by Bram Moolenaar
+  *
+  * Do ":help uganda"  in Vim to read copying and usage conditions.
+  * Do ":help credits" in Vim to see a list of people who contributed.
+  * See README.txt for an overview of the Vim source code.
+  */
+ 
+ /*
+  * usercmd.c: User defined command support
+  */
+ 
+ #include "vim.h"
+ 
+ typedef struct ucmd
+ {
+ char_u*uc_name;   // The command name
+ long_uuc_argt;// The argument type
+ char_u*uc_rep;// The command's replacement string
+ long  uc_def; // The default value for a range/count
+ int   uc_compl;   // completion type
+ int   uc_addr_type;   // The command's address type
+ # ifdef FEAT_EVAL
+ sctx_Tuc_script_ctx;  // SCTX where the command was defined
+ #  ifdef FEAT_CMDL_COMPL
+ char_u*uc_compl_arg;  // completion argument if any
+ #  endif
+ # endif
+ } ucmd_T;
+ 
+ // List of all user commands.
+ static garray_T ucmds = {0, 0, sizeof(ucmd_T), 4, NULL};
+ 
+ #define USER_CMD(i) (&((ucmd_T *)(ucmds.ga_data))[i])
+ #define USER_CMD_GA(gap, i) (&((ucmd_T *)((gap)->ga_data))[i])
+ 
+ /*
+  * List of names for completion for ":command" with the EXPAND_ flag.
+  * Must be alphabetical for completion.
+  */
+ static struct
+ {
+ int   expand;
+ char*name;
+ } command_complete[] =
+ {
+ {EXPAND_ARGLIST, "arglist"},
+ {EXPAND_AUGROUP, "augroup"},
+ {EXPAND_BEHAVE, "behave"},
+ {EXPAND_BUFFERS, "buffer"},
+ {EXPAND_COLORS, "color"},
+ {EXPAND_COMMANDS, "command"},
+ {EXPAND_COMPILER, "compiler"},
+ #if defined(FEAT_CSCOPE)
+ {EXPAND_CSCOPE, "cscope"},
+ #endif
+ #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+ {EXPAND_USER_DEFINED, "custom"},
+ {EXPAND_USER_LIST, "customlist"},
+ #endif
+ {EXPAND_DIRECTORIES, "dir"},
+ {EXPAND_ENV_VARS, "environment"},
+ {EXPAND_EVENTS, "event"},
+ {EXPAND_EXPRESSION, "expression"},
+ {EXPAND_FILES, "file"},
+ {EXPAND_FILES_IN_PATH, "file_in_path"},
+ {EXPAND_FILETYPE, "filetype"},
+ {EXPAND_FUNCTIONS, "function"},
+ {EXPAND_HELP, "help"},
+ {EXPAND_HIGHLIGHT, "highlight"},
+ #if defined(FEAT_CMDHIST)
+ {EXPAND_HISTORY, "history"},
+ #endif
+ #if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ {EXPAND_LOCALES, "locale"},
+ #endif
+ {EXPAND_MAPCLEAR, "mapclear"},
+ {EXPAND_MAPPINGS, "mapping"},
+ {EXPAND_MENUS, "menu"},
+ {EXPAND_MESSAGES, "messages"},
+ {EXPAND_OWNSYNTAX, "syntax"},
+ #if defined(FEAT_PROFILE)
+ {EXPAND_SYNTIME, "syntime"},
+ #endif
+ {EXPAND_SETTINGS, "option"},
+ {EXPAND_PACKADD, "packadd"},
+ {EXPAND_SHELLCMD, "shellcmd"},
+ #if defined(FEAT_SIGNS)
+ {EXPAND_SIGN, "sign"},
+ #endif
+ {EXPAND_TAGS, "tag"},
+ {EXPAND_TAGS_LISTFILES, "tag_listfiles"},
+ {EXPAND_USER, "user"},
+ {EXPAND_USER_VARS, "var"},
+ {0, NULL}
+ };
+ 
+ /*
+  * List of names of address types.  Must be alphabetical for completion.
+  */
+ static struct
+ {
+ int   expand;
+ char*name;
+ char*shortname;
+ } addr_type_complete[] =
+ {
+ {ADDR_ARGUMENTS, "arguments", "arg"},
+ {ADDR_LINES, "lines", "line"},
+ {ADDR_LOADED_BUFFERS, "loaded_buffers", "load"},
+ {ADDR_TABS, "tabs", "tab"},
+ {ADDR_BUFFERS, "buffers", "buf"},
+ {ADDR_WINDOWS, "windows", "win"},
+ {ADDR_QUICKFIX, "quickfix", "qf"},
+ {ADDR_OTHER, "other", "?"},
+ {-1, NULL, NULL}
+ };
+ 
+ #define UC_BUFFER 1   // -buffer: local to current buffer
+ 
+ /*
+  * Search for a user command that matches "eap->cmd".
+  * Return cmdidx in "eap->cmdidx", flags in "eap->argt", idx in 
"eap->useridx".
+  * Return a pointer to just after the command.
+  * Return NULL if there is no matching command.
+  */
+ char_u *
+ find_ucmd(
+ exarg_T   *eap,
+ char_u*p, // end of the command 

Re: "Download about Vim" official site

2019-04-27 Fir de Conversatie Christian Brabandt


On Fr, 26 Apr 2019, Yusuke Fujita wrote:

> I installed on Cent OS according to the official installation procedure, but 
> failed with the make command.

Are there no binary packages available that provide an uptodate Vim?

> 
> https://www.vim.org/download.php
> 
> ```
> git clone https://github.com/vim/vim.git
> cd vim/src
> make
> ```
> error 
> ```
> [vagrant@localhost src]$ make
> Makefile:304: auto/config.mk: No such file or directory

That is irrelevant

> rm -f auto/config.cache
> ...
> ```
> [error log 
> detail](https://gist.github.com/dasman74/cbf416236670230ab11e3f2006e11be1)

You simply forgot to install the binaries and all required runtime 
files. It would work if you run ~/vim/src/vim

So yes, `make install` is required if you want to **install** the 
freshly compiled vim.

> However, there is a description of `sudo make install` on the following page, 
> and if I run` sudo make install`  I can install it.
> https://www.vim.org/git.php
> 
> ```
> cd src
> make distclean  # if you build Vim before
> make
> sudo make install
> ```

Note, you only need `sudo` powers if you want to install Vim to a place 
where you do not have write permissions as normal user.

> I think it would be better to add `sudo make install` to the official site 
> download procedure.

Agreed, that would be better.


Mit freundlichen Grüßen
Christian
-- 
Das Leidende und Geschwächte ist keiner Abhärtung fähig.
-- Arthur Schopenhauer (Aphorismen zur Lebensweisheit)

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


"Download about Vim" official site

2019-04-27 Fir de Conversatie Yusuke Fujita
I installed on Cent OS according to the official installation procedure, but 
failed with the make command.

https://www.vim.org/download.php

```
git clone https://github.com/vim/vim.git
cd vim/src
make
```
error 
```
[vagrant@localhost src]$ make
Makefile:304: auto/config.mk: No such file or directory
rm -f auto/config.cache
...
```
[error log 
detail](https://gist.github.com/dasman74/cbf416236670230ab11e3f2006e11be1)

However, there is a description of `sudo make install` on the following page, 
and if I run` sudo make install`  I can install it.
https://www.vim.org/git.php

```
cd src
make distclean  # if you build Vim before
make
sudo make install
```


I think it would be better to add `sudo make install` to the official site 
download procedure.


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