Re: Patch 8.1.1256

2019-05-03 Fir de Conversatie Yegappan Lakshmanan
Hi Bram,

On Fri, May 3, 2019 at 12:56 PM Bram Moolenaar  wrote:
>
> Patch 8.1.1256
> Problem:Cannot navigate through errors relative to the cursor.
> Solution:   Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan,
> closes #4316)
> Files:  runtime/doc/index.txt, runtime/doc/quickfix.txt, src/ex_cmdidxs.h,
> src/ex_cmds.h, src/ex_docmd.c, src/proto/quickfix.pro,
> src/quickfix.c, src/testdir/test_quickfix.vim
>

This patch uses ADDR_OTHER for the new Ex commands. With this, when a
negative count is passed to the command, it is subtracted from the current
line number and passed to the command. The command will then jump to
that quickfix entry. I think the command should display an error in this case.

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

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1259
Problem:Crash when exiting early. (Ralf Schandl)
Solution:   Only pop/push the title when it was set. (closes #4334)
Files:  src/os_unix.c, src/misc2.c, src/usercmd.c, src/tag.c


*** ../vim-8.1.1258/src/os_unix.c   2019-05-02 23:00:19.227658452 +0200
--- src/os_unix.c   2019-05-03 22:56:29.021478366 +0200
***
*** 2205,2218 
  void
  mch_restore_title(int which)
  {
  /* only restore the title or icon when it has been set */
  mch_settitle(((which & SAVE_RESTORE_TITLE) && did_set_title) ?
(oldtitle ? oldtitle : p_titleold) : NULL,
   ((which & SAVE_RESTORE_ICON) && did_set_icon) ? oldicon : NULL);
  
! // pop and push from/to the stack
! term_pop_title(which);
! term_push_title(which);
  }
  
  #endif /* FEAT_TITLE */
--- 2205,2223 
  void
  mch_restore_title(int which)
  {
+ int   do_push_pop = did_set_title || did_set_icon;
+ 
  /* only restore the title or icon when it has been set */
  mch_settitle(((which & SAVE_RESTORE_TITLE) && did_set_title) ?
(oldtitle ? oldtitle : p_titleold) : NULL,
   ((which & SAVE_RESTORE_ICON) && did_set_icon) ? oldicon : NULL);
  
! if (do_push_pop)
! {
!   // pop and push from/to the stack
!   term_pop_title(which);
!   term_push_title(which);
! }
  }
  
  #endif /* FEAT_TITLE */
*** ../vim-8.1.1258/src/misc2.c 2019-04-28 19:46:17.030060105 +0200
--- src/misc2.c 2019-05-03 23:12:59.332791168 +0200
***
*** 1068,1074 
  
  /* Close all tabs and windows.  Reset 'equalalways' to avoid redraws. */
  p_ea = FALSE;
! if (first_tabpage->tp_next != NULL)
do_cmdline_cmd((char_u *)"tabonly!");
  if (!ONE_WINDOW)
do_cmdline_cmd((char_u *)"only!");
--- 1068,1074 
  
  /* Close all tabs and windows.  Reset 'equalalways' to avoid redraws. */
  p_ea = FALSE;
! if (first_tabpage != NULL && first_tabpage->tp_next != NULL)
do_cmdline_cmd((char_u *)"tabonly!");
  if (!ONE_WINDOW)
do_cmdline_cmd((char_u *)"only!");
***
*** 1085,1113 
  // Clear user commands (before deleting buffers).
  ex_comclear(NULL);
  
  # ifdef FEAT_MENU
! /* Clear menus. */
! do_cmdline_cmd((char_u *)"aunmenu *");
  #  ifdef FEAT_MULTI_LANG
! do_cmdline_cmd((char_u *)"menutranslate clear");
  #  endif
  # endif
! 
! /* Clear mappings, abbreviations, breakpoints. */
! do_cmdline_cmd((char_u *)"lmapclear");
! do_cmdline_cmd((char_u *)"xmapclear");
! do_cmdline_cmd((char_u *)"mapclear");
! do_cmdline_cmd((char_u *)"mapclear!");
! do_cmdline_cmd((char_u *)"abclear");
  # if defined(FEAT_EVAL)
! do_cmdline_cmd((char_u *)"breakdel *");
  # endif
  # if defined(FEAT_PROFILE)
! do_cmdline_cmd((char_u *)"profdel *");
  # endif
  # if defined(FEAT_KEYMAP)
! do_cmdline_cmd((char_u *)"set keymap=");
  #endif
  
  # ifdef FEAT_TITLE
  free_titles();
--- 1085,1117 
  // Clear user commands (before deleting buffers).
  ex_comclear(NULL);
  
+ // When exiting from mainerr_arg_missing curbuf has not been initialized,
+ // and not much else.
+ if (curbuf != NULL)
+ {
  # ifdef FEAT_MENU
!   // Clear menus.
!   do_cmdline_cmd((char_u *)"aunmenu *");
  #  ifdef FEAT_MULTI_LANG
!   do_cmdline_cmd((char_u *)"menutranslate clear");
  #  endif
  # endif
!   // Clear mappings, abbreviations, breakpoints.
!   do_cmdline_cmd((char_u *)"lmapclear");
!   do_cmdline_cmd((char_u *)"xmapclear");
!   do_cmdline_cmd((char_u *)"mapclear");
!   do_cmdline_cmd((char_u *)"mapclear!");
!   do_cmdline_cmd((char_u *)"abclear");
  # if defined(FEAT_EVAL)
!   do_cmdline_cmd((char_u *)"breakdel *");
  # endif
  # if defined(FEAT_PROFILE)
!   do_cmdline_cmd((char_u *)"profdel *");
  # endif
  # if defined(FEAT_KEYMAP)
!   do_cmdline_cmd((char_u *)"set keymap=");
  #endif
+ }
  
  # ifdef FEAT_TITLE
  free_titles();
***
*** 1142,1148 
  set_expr_line(NULL);
  # endif
  # ifdef FEAT_DIFF
! diff_clear(curtab);
  # endif
  clear_sb_text(TRUE);/* free any scrollback text */
  
--- 1146,1153 
  set_expr_line(NULL);
  # endif
  # ifdef FEAT_DIFF
! if (curtab != NULL)
!   diff_clear(curtab);
  # endif
  clear_sb_text(TRUE);/* free any scrollback text */
  
***
*** 1172,1188 
tabpage_T   *tab;
  
qf_free_all(NULL);
!   /* Free all location lists */
FOR_ALL_TAB_WINDOWS(tab, win)
qf_free_all(win);
  }
  #endif
  
! /* Close all script inputs. */
  close_all_scripts();
  
! /* Destroy all windows.  Must come before freeing buffers. */
! win_free_all();
  
  /* Free all option values.  Must come after closing windows. */
  free_all_options();
--- 1177,1194 
tabpage_T   *tab;
  

Patch 8.1.1258

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1258
Problem:The "N files to edit" message can not be surpressed.
Solution:   Surpress the message with --not-a-term. (closes #4320)
Files:  src/main.c


*** ../vim-8.1.1257/src/main.c  2019-04-28 22:25:03.244480028 +0200
--- src/main.c  2019-05-03 22:22:01.481884022 +0200
***
*** 375,383 
setvbuf(stdout, NULL, _IOLBF, 0);
  #endif
  
! /* This message comes before term inits, but after setting "silent_mode"
!  * when the input is not a tty. */
! if (GARGCOUNT > 1 && !silent_mode)
printf(_("%d files to edit\n"), GARGCOUNT);
  
  if (params.want_full_screen && !silent_mode)
--- 375,383 
setvbuf(stdout, NULL, _IOLBF, 0);
  #endif
  
! // This message comes before term inits, but after setting "silent_mode"
! // when the input is not a tty. Omit the message with --not-a-term.
! if (GARGCOUNT > 1 && !silent_mode && !is_not_a_term())
printf(_("%d files to edit\n"), GARGCOUNT);
  
  if (params.want_full_screen && !silent_mode)
*** ../vim-8.1.1257/src/version.c   2019-05-03 22:14:59.452363625 +0200
--- src/version.c   2019-05-03 22:24:01.537189664 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1258,
  /**/

-- 
An indication you must be a manager:
You feel sorry for Dilbert's boss.

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

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1257
Problem:MSVC: name of object directory now always right.
Solution:   Adjust comment.  Don't use different directory for DIRECTX.  Do
use different directory for USE_MSVCRT. (Ken Takata, closes #4333)
Files:  src/Make_mvc.mak


*** ../vim-8.1.1256/src/Make_mvc.mak2019-04-28 19:46:17.018060159 +0200
--- src/Make_mvc.mak2019-05-03 22:13:39.800841637 +0200
***
*** 192,199 
  DIRECTX = $(GUI)
  !endif
  
! # Select one of eight object code directories, depends on GUI, OLE, DEBUG and
! # interfaces.
  # If you change something else, do "make clean" first!
  !if "$(VIMDLL)" == "yes"
  OBJDIR = .\ObjD
--- 192,198 
  DIRECTX = $(GUI)
  !endif
  
! # Select a code directory, depends on GUI, OLE, DEBUG, interfaces and etc.
  # If you change something else, do "make clean" first!
  !if "$(VIMDLL)" == "yes"
  OBJDIR = .\ObjD
***
*** 202,208 
  !else
  OBJDIR = .\ObjC
  !endif
! !if "$(DIRECTX)" == "yes"
  OBJDIR = $(OBJDIR)X
  !endif
  !if "$(OLE)" == "yes"
--- 201,207 
  !else
  OBJDIR = .\ObjC
  !endif
! !if "$(DIRECTX)" == "yes" && "$(GUI)" == "yes"
  OBJDIR = $(OBJDIR)X
  !endif
  !if "$(OLE)" == "yes"
***
*** 229,234 
--- 228,236 
  !ifdef MZSCHEME
  OBJDIR = $(OBJDIR)Z
  !endif
+ !ifdef USE_MSVCRT
+ OBJDIR = $(OBJDIR)V
+ !endif
  !if "$(DEBUG)" == "yes"
  OBJDIR = $(OBJDIR)d
  !endif
*** ../vim-8.1.1256/src/version.c   2019-05-03 21:56:31.367540560 +0200
--- src/version.c   2019-05-03 22:13:53.420759606 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1257,
  /**/

-- 
ROBIN:  The what?
ARTHUR: The Holy Hand Grenade of Antioch.  'Tis one of the sacred relics
Brother Maynard always carries with him.
ALL:Yes. Of course.
ARTHUR: (shouting) Bring up the Holy Hand Grenade!
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.1.1256

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1256
Problem:Cannot navigate through errors relative to the cursor.
Solution:   Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan,
closes #4316)
Files:  runtime/doc/index.txt, runtime/doc/quickfix.txt, src/ex_cmdidxs.h,
src/ex_cmds.h, src/ex_docmd.c, src/proto/quickfix.pro,
src/quickfix.c, src/testdir/test_quickfix.vim


*** ../vim-8.1.1255/runtime/doc/index.txt   2019-04-27 20:36:52.526303597 
+0200
--- runtime/doc/index.txt   2019-05-03 21:35:09.162087906 +0200
***
*** 1140,1150 
--- 1192,1204 
  |:cNfile| :cNf[ile]   go to last error in previous file
  |:cabbrev|:ca[bbrev]  like ":abbreviate" but for Command-line mode
  |:cabclear|   :cabc[lear] clear all abbreviations for Command-line mode
+ |:cabove| :cabo[ve]   go to error above current line
  |:caddbuffer| :cad[dbuffer]   add errors from buffer
  |:caddexpr|   :cadde[xpr] add errors from expr
  |:caddfile|   :caddf[ile] add error message to current quickfix list
  |:call|   :cal[l] call a function
  |:catch|  :cat[ch]part of a :try command
+ |:cbelow| :cbe[low]   got to error below current line
  |:cbottom|:cbo[ttom]  scroll to the bottom of the quickfix window
  |:cbuffer|:cb[uffer]  parse error messages and jump to first error
  |:cc| :cc go to specific error
***
*** 1302,1313 
--- 1356,1369 
  |:lNext|  :lN[ext]go to previous entry in location list
  |:lNfile| :lNf[ile]   go to last entry in previous file
  |:list|   :l[ist] print lines
+ |:labove| :lab[ove]   go to location above current line
  |:laddexpr|   :lad[dexpr] add locations from expr
  |:laddbuffer| :laddb[uffer]   add locations from buffer
  |:laddfile|   :laddf[ile] add locations to current location list
  |:last|   :la[st] go to the last file in the argument list
  |:language|   :lan[guage] set the language (locale)
  |:later|  :lat[er]go to newer change, redo
+ |:lbelow| :lbe[low]   go to location below current line
  |:lbottom|:lbo[ttom]  scroll to the bottom of the location window
  |:lbuffer|:lb[uffer]  parse locations and jump to first location
  |:lcd|:lc[d]  change directory locally
--- 1703,1708 
*** ../vim-8.1.1255/runtime/doc/quickfix.txt2019-03-17 16:39:01.566006172 
+0100
--- runtime/doc/quickfix.txt2019-05-03 21:35:09.166087887 +0200
***
*** 123,128 
--- 123,158 
list for the current window is used instead of the
quickfix list.
  
+   *:cabo* *:cabove*
+ :[count]cabo[ve]  Go to the [count] error above the current line in the
+   current buffer.  If [count] is omitted, then 1 is
+   used.  If there are no errors, then an error message
+   is displayed.  Assumes that the entries in a quickfix
+   list are sorted by their buffer number and line
+   number. If there are multiple errors on the same line,
+   then only the first entry is used.  If [count] exceeds
+   the number of entries above the current line, then the
+   first error in the file is selected.
+ 
+   *:lab* *:labove*
+ :[count]lab[ove]  Same as ":cabove", except the location list for the
+   current window is used instead of the quickfix list.
+ 
+   *:cbe* *:cbelow*
+ :[count]cbe[low]  Go to the [count] error below the current line in the
+   current buffer.  If [count] is omitted, then 1 is
+   used.  If there are no errors, then an error message
+   is displayed.  Assumes that the entries in a quickfix
+   list are sorted by their buffer number and line
+   number.  If there are multiple errors on the same
+   line, then only the first entry is used.  If [count]
+   exceeds the number of entries below the current line,
+   then the last error in the file is selected.
+ 
+   *:lbe* *:lbelow*
+ :[count]lbe[low]  Same as ":cbelow", except the location list for the
+   current window is used instead of the quickfix list.
+ 
*:cnf* *:cnfile*
  :[count]cnf[ile][!]   Display the first error in the [count] next file in
the list that includes a file name.  If there are no
*** ../vim-8.1.1255/src/ex_cmdidxs.h

Re: Found errors in Test_term_mouse_double_click_to_create_tab():

2019-05-03 Fir de Conversatie Bram Moolenaar


Elimar Riesebieter wrote:

> compiling v8.1.1250 within a remote tmux session I get:
> 
> Found errors in Test_term_mouse_double_click_to_create_tab():
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=xterm2: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=xterm2: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page
> 1', 'Xtab1', 'Tab page 2', '>   Xtab2']
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=sgr: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=sgr: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
> page 2', '>   Xtab2']
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=urxvt: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=urxvt: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
> page 2', '>   Xtab2']
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=dec: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=dec: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
> page 2', '>   Xtab2']
> TEST FAILURE

I tried running the tests in tmux, but it works fine for me.
Anything else that would matter?

-- 
ARTHUR: Go on, Bors, chop its head off.
BORS:   Right.  Silly little bleeder.  One rabbit stew coming up.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.1.1255

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1255
Problem:Building desktop files fails on FreeBSD. (Adam Weinberger)
Solution:   Avoid using non-portable construct in Makefile. (closes #4332)
Files:  src/po/Makefile


*** ../vim-8.1.1254/src/po/Makefile 2019-04-30 21:27:30.943623715 +0200
--- src/po/Makefile 2019-05-03 21:08:46.310110828 +0200
***
*** 165,173 
po/gvim.desktop.in po/vim.desktop.in
mv -f ../$(PACKAGE).po $(PACKAGE).pot
  
! %.desktop: %.desktop.in $(POFILES)
@echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
!   $(MSGFMT) --desktop -d . --template $< -o $@
  
  update-po: $(LANGUAGES)
  
--- 165,177 
po/gvim.desktop.in po/vim.desktop.in
mv -f ../$(PACKAGE).po $(PACKAGE).pot
  
! vim.desktop: vim.desktop.in $(POFILES)
@echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
!   $(MSGFMT) --desktop -d . --template vim.desktop.in -o vim.desktop
! 
! gvim.desktop: gvim.desktop.in $(POFILES)
!   @echo $(LANGUAGES) | tr " " "\n" |sed -e '/\./d' | sort > LINGUAS
!   $(MSGFMT) --desktop -d . --template gvim.desktop.in -o gvim.desktop
  
  update-po: $(LANGUAGES)
  
*** ../vim-8.1.1254/src/version.c   2019-05-03 21:10:32.261521512 +0200
--- src/version.c   2019-05-03 21:19:26.910579303 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1255,
  /**/

-- 
TIM:   That is not an ordinary rabbit ... 'tis the most foul cruel and
   bad-tempered thing you ever set eyes on.
ROBIN: You tit.  I soiled my armour I was so scared!
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.1.1254

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1254
Problem:Mapping completion contains dead code.
Solution:   Remove the code.
Files:  src/term.c, src/testdir/test_cmdline.vim


*** ../vim-8.1.1253/src/term.c  2019-05-03 15:13:53.758898729 +0200
--- src/term.c  2019-05-03 21:01:34.992552621 +0200
***
*** 6649,6655 
  int   modifiers;
  int   cpo_bslash;
  int   cpo_special;
- int   cpo_keycode;
  
  ga_init();
  ga.ga_itemsize = 1;
--- 6649,6654 
***
*** 6657,6663 
  
  cpo_bslash = (vim_strchr(p_cpo, CPO_BSLASH) != NULL);
  cpo_special = (vim_strchr(p_cpo, CPO_SPECI) != NULL);
- cpo_keycode = (vim_strchr(p_cpo, CPO_KEYCODE) == NULL);
  
  for (; *str; ++str)
  {
--- 6656,6661 
***
*** 6671,6692 
modifiers = *++str;
c = *++str;
}
-   if (cpo_special && cpo_keycode && c == K_SPECIAL && !modifiers)
-   {
-   int i;
- 
-   /* try to find special key in termcodes */
-   for (i = 0; i < tc_len; ++i)
-   if (termcodes[i].name[0] == str[1]
-   && termcodes[i].name[1] == str[2])
-   break;
-   if (i < tc_len)
-   {
-   ga_concat(, termcodes[i].code);
-   str += 2;
-   continue; /* for (str) */
-   }
-   }
if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
{
if (cpo_special)
--- 6669,6674 
*** ../vim-8.1.1253/src/testdir/test_cmdline.vim2019-05-03 
16:49:21.542462554 +0200
--- src/testdir/test_cmdline.vim2019-05-03 21:00:30.172928333 +0200
***
*** 107,115 
--- 107,120 
  
set cpo+=<
map  left
+   exe "set t_k6=\[17~"
+   call feedkeys(":map \[17~x f6x\", 'xt')
call feedkeys(":map \\"\", 'xt')
call assert_equal('"map ', getreg(':'))
+   call feedkeys(":map \[17~\\\"\", 'xt')
+   call assert_equal("\"map x", getreg(':'))
unmap 
+   call feedkeys(":unmap \[17~x\", 'xt')
set cpo-=<
  
set cpo+=B
*** ../vim-8.1.1253/src/version.c   2019-05-03 16:49:21.542462554 +0200
--- src/version.c   2019-05-03 21:02:33.692214847 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1254,
  /**/

-- 
If cars evolved at the same rate as computers have, they'd cost five euro, 
run for a year on a couple of liters of petrol, and explode once a day.

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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim/vim] vim 7.4.52 on ubuntu 14.04 in compatible mode does not page :set all when invoked vi (#4329)

2019-05-03 Fir de Conversatie Dominique Pellé
oldunixguy  wrote:

> Christian,
> Yes, entering ":set more" does work!. So I'm not sure why setting more in the 
> EXINIT didnt work.
>
> I do have the ability to build. I'm not familiar to these new repo systems 
> like git. If I can figure out how to download a tar or zip and locate build 
> instructions I can certainly make and test it.
>
> Thanks for the advice on the internal help. I still use vim like I have vi 
> for the past 38 years and rarely exploit the new stuff in vim (like the 
> internal help). I was expecting to find external help on "more" since I was 
> seeing a good bit of vim usage info on the internet I will try to study 
> :h and expand my knowledge of vim. Frankly, I have been very successful with 
> classic vi that I have not been driven to or seeking more features!
>
> Can you point me to the steps to get some blob to do a build?
>
> thanks for your work and help!
> oldunixguy

This should work on Ubuntu:

# Install packages needed to be able to build vim
$ sudo apt-get build-dep vim-gnome

# Download Vim source code
$ git clone https://github.com/vim/vim

# Configure, build, ...
$ cd vim
$ ./configure --enable-gui=gtk3 --enable-python3interp=yes --with-features=huge
$ make -j8
$ make test
$ sudo make install

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vim/vim] Add support for the cbelow/cabove/lbelow/labove commands (#4316)

2019-05-03 Fir de Conversatie Yegappan Lakshmanan
Hi Bram,

On Thu, May 2, 2019 at 9:25 AM Yegappan Lakshmanan  wrote:
>
> > > Yegappan wrote:
> > >
> > > > > > > > We will then have the following commands:
> > > > > > > >
> > > > > > > > cbelow - Go to an error line below the current line in the 
> > > > > > > > current file
> > > > > > > > cabove - Go to an error line above the current line in the 
> > > > > > > > current file
> > > > > > > > cbefore - Go to an error before the current column in the 
> > > > > > > > current file
> > > > > > > > cafter - Go to an error after the current column in the current 
> > > > > > > > file
> > > > > > >
> > > > > > > Right.  And when giving a count to cbelow/cabove it counts all the
> > > > > > > errors in the same line as one.  Thus if there are three matches 
> > > > > > > in the
> > > > > > > line above and one two lines up, then ":2cabove" goes two lines 
> > > > > > > up.
> > > > > > >
> > > > > >
> > > > > > The latest updated pull request implements the above behavior. 
> > > > > > Currently
> > > > > > only the cabove and cbelow commands are implemented.
> > > > > >
> > > > > > The current implementation supports count only after the command 
> > > > > > name
> > > > > > and not before the command. I did this to support only positive 
> > > > > > numbers
> > > > > > for the count and not use the range specification from the buffer.
> > > > >
> > > > > :2cabove should work.  Use "RANGE" and "ADDR_OTHER" in the command 
> > > > > spec.
> > > >
> > > > I was using RANGE in the command spec. But when a negative count is
> > > > supplied to the command, it uses the current line number from the 
> > > > buffer and
> > > > subtracts the specified count. I wanted to display an error for 
> > > > negative values.
> > > > I can use RANGE, if the value is negative, it will ignore the supplied 
> > > > count.
> > >
> > > I looked into the way the type of range is specified, but it has a long
> > > history of subtle ways things work not quite as expected.  Therefore
> > > ADDR_OTHER will default to using buffer lines.
> > >
> > > We could add a new address type, that does not use the buffer lines.
> > > Not sure what to call it.  ADDR_NOT_LINES is not quite right.
> > > I did do a bit of cleanup and removed NOTADR from the command flags.
> > > It seemed a duplicate of using ADDR_OTHER, but it turns out it isn't
> > > quite so.
> > >
> >
> > I updated the PR to use the new ADDR_NONE for the cbelow and cabove
> > commands. Now the negative and invalid ranges are properly passed to
> > the command function and the function checks for the invalid values and
> > displays an error message. This works on Linux and Mac (Travis CI builds).
> > But on Windows (Appveyor), the test fails. It looks like on MS-Windows,
> > the negative range is still converted into a buffer line number relative to
> > the current line number.
> >
> > https://travis-ci.org/vim/vim/builds/527133913
> > https://ci.appveyor.com/project/chrisbra/vim/build/job/iw0t4ik7b28mwq1r
> >
>
> This is caused by the difference in size of the long type (64-bit vs 32-bit)
> between the Linux/Mac and MS-Windows builds. To check for the negative
> values, I am casting the long value to an integer. This works for the
> 64-bit long value and not for the 32-bit long value.
>

I have addressed this issue in the updated PR. The get_address()
function was not properly returning the count passed to commands
with ADDR_NONE. It was returning MAXLNUM - {count}. I have
modified it to return the actual count supplied by the user.

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

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1253 (after 8.1.1252)
Problem:Mapping completion test fails.
Solution:   Fix expected output.
Files:  src/testdir/test_cmdline.vim


*** ../vim-8.1.1252/src/testdir/test_cmdline.vim2019-05-03 
16:05:37.557690929 +0200
--- src/testdir/test_cmdline.vim2019-05-03 16:48:18.962818667 +0200
***
*** 91,97 
call feedkeys(":map \\"\", 'xt')
call assert_equal('"map ', getreg(':'))
call feedkeys(":map \\\"\", 'xt')
!   call assert_equal('"map x', getreg(':'))
unmap ,f
unmap ,g
unmap 
--- 91,97 
call feedkeys(":map \\"\", 'xt')
call assert_equal('"map ', getreg(':'))
call feedkeys(":map \\\"\", 'xt')
!   call assert_equal("\"map \", getreg(':'))
unmap ,f
unmap ,g
unmap 
***
*** 102,108 
call feedkeys(":map \\"\", 'xt')
call assert_equal('"map ', getreg(':'))
call feedkeys(":map \\"\", 'xt')
!   call assert_equal('"map 
  
set cpo+=<
--- 102,108 
call feedkeys(":map \\"\", 'xt')
call assert_equal('"map ', getreg(':'))
call feedkeys(":map \\"\", 'xt')
!   call assert_equal("\"map ", getreg(':'))
unmap 
  
set cpo+=<
*** ../vim-8.1.1252/src/version.c   2019-05-03 16:05:37.557690929 +0200
--- src/version.c   2019-05-03 16:49:04.418559979 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1253,
  /**/

-- 
In Africa some of the native tribes have a custom of beating the ground
with clubs and uttering spine chilling cries.  Anthropologists call
this a form of primitive self-expression.  In America we call it golf.

 /// 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: Found errors in Test_term_mouse_double_click_to_create_tab():

2019-05-03 Fir de Conversatie Dominique Pellé
Elimar Riesebieter  wrote:

> Hi,
>
> compiling v8.1.1250 within a remote tmux session I get:
>
> Found errors in Test_term_mouse_double_click_to_create_tab():
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=xterm2: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=xterm2: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page
> 1', 'Xtab1', 'Tab page 2', '>   Xtab2']
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=sgr: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=sgr: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
> page 2', '>   Xtab2']
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=urxvt: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=urxvt: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
> page 2', '>   Xtab2']
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
> ttymouse=dec: Expected 32 but got 0
> function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
> ttymouse=dec: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
> Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
> page 2', '>   Xtab2']
> TEST FAILURE

The test also always fails for me at 8.1.1250 on Linux x86_64.
The test always passes at 8.1.1.1249.

I'm not using tmux. I'm just running tests in a terminal (xterm or
xfce4-terminal)

Regards

Dominique

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

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1252
Problem:Not all mapping completion is tested.
Solution:   Add a few more mapping completion tests.
Files:  src/testdir/test_cmdline.vim


*** ../vim-8.1.1251/src/testdir/test_cmdline.vim2019-05-03 
15:13:53.758898729 +0200
--- src/testdir/test_cmdline.vim2019-05-03 16:02:33.066718994 +0200
***
*** 78,96 
--- 78,108 
call feedkeys(":map  \\"\", 'xt')
call assert_equal('"map  ', getreg(':'))
  
+   map x middle
+ 
map ,f commaf
map ,g commaf
+   map  left
+   map x shiftleft
call feedkeys(":map ,\\\"\", 'xt')
call assert_equal('"map ,f', getreg(':'))
call feedkeys(":map ,"\", 'xt')
call assert_equal('"map ,g', getreg(':'))
+   call feedkeys(":map \\"\", 'xt')
+   call assert_equal('"map ', getreg(':'))
+   call feedkeys(":map \\\"\", 'xt')
+   call assert_equal('"map x', getreg(':'))
unmap ,f
unmap ,g
+   unmap 
+   unmap x
  
set cpo-=< cpo-=B cpo-=k
map  left
call feedkeys(":map \\"\", 'xt')
call assert_equal('"map ', getreg(':'))
+   call feedkeys(":map \\"\", 'xt')
+   call assert_equal('"map 
  
set cpo+=<
***
*** 113,118 
--- 125,133 
call assert_equal('"map ', getreg(':'))
unmap 
set cpo-=k
+ 
+   unmap x
+   set cpo
  endfunc
  
  func Test_match_completion()
*** ../vim-8.1.1251/src/version.c   2019-05-03 15:13:53.758898729 +0200
--- src/version.c   2019-05-03 16:05:19.257792890 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1252,
  /**/

-- 
If "R" is Reverse, how come "D" is FORWARD?

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

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1251
Problem:No test for completion of mapping keys.
Solution:   Add a test.  Also clean up the code.
Files:  src/getchar.c, src/term.c, src/proto/term.pro,
src/testdir/test_cmdline.vim


*** ../vim-8.1.1250/src/getchar.c   2019-04-29 21:58:37.667769672 +0200
--- src/getchar.c   2019-05-03 14:49:32.298980123 +0200
***
*** 4263,4269 
  }
  
  /*
!  * Find all mapping/abbreviation names that match regexp 'prog'.
   * For command line expansion of ":[un]map" and ":[un]abbrev" in all modes.
   * Return OK if matches found, FAIL otherwise.
   */
--- 4263,4269 
  }
  
  /*
!  * Find all mapping/abbreviation names that match regexp "regmatch"'.
   * For command line expansion of ":[un]map" and ":[un]abbrev" in all modes.
   * Return OK if matches found, FAIL otherwise.
   */
***
*** 4343,4349 
{
if (mp->m_mode & expand_mapmodes)
{
!   p = translate_mapping(mp->m_keys, TRUE);
if (p != NULL && vim_regexec(regmatch, p, (colnr_T)0))
{
if (round == 1)
--- 4343,4349 
{
if (mp->m_mode & expand_mapmodes)
{
!   p = translate_mapping(mp->m_keys);
if (p != NULL && vim_regexec(regmatch, p, (colnr_T)0))
{
if (round == 1)
*** ../vim-8.1.1250/src/term.c  2019-05-02 20:24:08.624617859 +0200
--- src/term.c  2019-05-03 14:49:53.686860278 +0200
***
*** 6629,6650 
  #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
  /*
   * Translate an internal mapping/abbreviation representation into the
!  * corresponding external one recognized by :map/:abbrev commands;
!  * respects the current B/k/< settings of 'cpoption'.
   *
   * This function is called when expanding mappings/abbreviations on the
!  * command-line, and for building the "Ambiguous mapping..." error message.
   *
!  * It uses a growarray to build the translation string since the
!  * latter can be wider than the original description. The caller has to
!  * free the string afterwards.
   *
   * Returns NULL when there is a problem.
   */
  char_u *
! translate_mapping(
! char_u*str,
! int   expmap)  /* TRUE when expanding mappings on 
command-line */
  {
  garray_T  ga;
  int   c;
--- 6629,6648 
  #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
  /*
   * Translate an internal mapping/abbreviation representation into the
!  * corresponding external one recognized by :map/:abbrev commands.
!  * Respects the current B/k/< settings of 'cpoption'.
   *
   * This function is called when expanding mappings/abbreviations on the
!  * command-line.
   *
!  * It uses a growarray to build the translation string since the latter can be
!  * wider than the original description. The caller has to free the string
!  * afterwards.
   *
   * Returns NULL when there is a problem.
   */
  char_u *
! translate_mapping(char_u *str)
  {
  garray_T  ga;
  int   c;
***
*** 6691,6697 
}
if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
{
!   if (expmap && cpo_special)
{
ga_clear();
return NULL;
--- 6689,6695 
}
if (c == K_SPECIAL && str[1] != NUL && str[2] != NUL)
{
!   if (cpo_special)
{
ga_clear();
return NULL;
***
*** 6703,6709 
}
if (IS_SPECIAL(c) || modifiers) /* special key */
{
!   if (expmap && cpo_special)
{
ga_clear();
return NULL;
--- 6701,6707 
}
if (IS_SPECIAL(c) || modifiers) /* special key */
{
!   if (cpo_special)
{
ga_clear();
return NULL;
*** ../vim-8.1.1250/src/proto/term.pro  2018-08-21 13:09:06.254115882 +0200
--- src/proto/term.pro  2019-05-03 14:49:56.962841925 +0200
***
*** 74,80 
  int find_term_bykeys(char_u *src);
  void show_termcodes(void);
  int show_one_termcode(char_u *name, char_u *code, int printit);
! char_u *translate_mapping(char_u *str, int expmap);
  void update_tcap(int attr);
  void swap_tcap(void);
  guicolor_T gui_get_color_cmn(char_u *name);
--- 74,80 
  int find_term_bykeys(char_u *src);
  void show_termcodes(void);
  int show_one_termcode(char_u *name, char_u *code, int printit);
! char_u *translate_mapping(char_u *str);
  void update_tcap(int attr);
  void swap_tcap(void);
  guicolor_T gui_get_color_cmn(char_u *name);
*** ../vim-8.1.1250/src/testdir/test_cmdline.vim2019-03-28 
21:26:19.252618909 +0100
--- src/testdir/test_cmdline.vim2019-05-03 

Found errors in Test_term_mouse_double_click_to_create_tab():

2019-05-03 Fir de Conversatie Elimar Riesebieter
Hi,

compiling v8.1.1250 within a remote tmux session I get:

Found errors in Test_term_mouse_double_click_to_create_tab():
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
ttymouse=xterm2: Expected 32 but got 0
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
ttymouse=xterm2: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page
1', 'Xtab1', 'Tab page 2', '>   Xtab2']
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
ttymouse=sgr: Expected 32 but got 0
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
ttymouse=sgr: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
page 2', '>   Xtab2']
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
ttymouse=urxvt: Expected 32 but got 0
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
ttymouse=urxvt: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
page 2', '>   Xtab2']
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 38: 
ttymouse=dec: Expected 32 but got 0
function RunTheTest[40]..Test_term_mouse_double_click_to_create_tab line 41: 
ttymouse=dec: Expected ['Tab page 1', 'Xtab1', 'Tab page 2', '>   [No 
Name]', 'Tab page 3', 'Xtab2'] but got ['Tab page 1', 'Xtab1', 'Tab 
page 2', '>   Xtab2']
TEST FAILURE


-- 
  From The Collaborative International Dictionary of English v.0.48 [gcide]:
  .
  arsehole \arse"hole`\ ([aum]rs"h[=o]l`), n.
 1. execretory opening at the end of the alimentary canal.

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

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1250
Problem:No test for netterm mouse.
Solution:   Add some tests for netterm mouse.
Files:  src/testdir/test_termcodes.vim


*** ../vim-8.1.1249/src/testdir/test_termcodes.vim  2019-05-02 
23:00:19.227658452 +0200
--- src/testdir/test_termcodes.vim  2019-05-03 13:42:03.533584828 +0200
***
*** 20,25 
--- 20,32 
let s:ttymouse_dec = []
  endif
  
+ " netterm only supports left click
+ if has('mouse_netterm')
+   let s:ttymouse_netterm = ['netterm']
+ else
+   let s:ttymouse_netterm = []
+ endif
+ 
  " Helper function to emit a terminal escape code.
  func TerminalEscapeCode(code, row, col, m)
if  ==# 'xterm2'
***
*** 43,51 
--- 50,64 
  call feedkeys(printf("\[%d;%d;%d;%d", a:code, a:down, a:row, 
a:col), 'Lx!')
  endfunc
  
+ func NettermEscapeCode(row, col)
+ call feedkeys(printf("\}%d,%d\r", a:row, a:col), 'Lx!')
+ endfunc
+ 
  func MouseLeftClick(row, col)
if  ==# 'dec'
  call DecEscapeCode(2, 4, a:row, a:col)
+   elseif  ==# 'netterm'
+ call NettermEscapeCode(a:row, a:col)
else
  call TerminalEscapeCode(0, a:row, a:col, 'M')
endif
***
*** 72,77 
--- 85,92 
  func MouseLeftRelease(row, col)
if  ==# 'dec'
  call DecEscapeCode(3, 0, a:row, a:col)
+   elseif  ==# 'netterm'
+ " send nothing
else
  call TerminalEscapeCode(3, a:row, a:col, 'm')
endif
***
*** 114,120 
set mouse=a term=xterm
call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
  
!   for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
  let msg = 'ttymouse=' .. ttymouse_val
  exe 'set ttymouse=' .. ttymouse_val
  go
--- 129,135 
set mouse=a term=xterm
call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
  
!   for ttymouse_val in s:ttymouse_values + s:ttymouse_dec + s:ttymouse_netterm
  let msg = 'ttymouse=' .. ttymouse_val
  exe 'set ttymouse=' .. ttymouse_val
  go
***
*** 363,369 
set mouse=a term=xterm
let row = 1
  
!   for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
  let msg = 'ttymouse=' .. ttymouse_val
  exe 'set ttymouse=' .. ttymouse_val
  e Xfoo
--- 378,384 
set mouse=a term=xterm
let row = 1
  
!   for ttymouse_val in s:ttymouse_values + s:ttymouse_dec + s:ttymouse_netterm
  let msg = 'ttymouse=' .. ttymouse_val
  exe 'set ttymouse=' .. ttymouse_val
  e Xfoo
***
*** 413,419 
let row = 1
let col = 
  
!   for ttymouse_val in s:ttymouse_values + s:ttymouse_dec
  if ttymouse_val ==# 'xterm2' && col > 223
" When 'ttymouse' is 'xterm2', row/col bigger than 223 are not 
supported.
continue
--- 428,434 
let row = 1
let col = 
  
!   for ttymouse_val in s:ttymouse_values + s:ttymouse_dec + s:ttymouse_netterm
  if ttymouse_val ==# 'xterm2' && col > 223
" When 'ttymouse' is 'xterm2', row/col bigger than 223 are not 
supported.
continue
*** ../vim-8.1.1249/src/version.c   2019-05-03 11:21:01.645784762 +0200
--- src/version.c   2019-05-03 13:43:44.645013888 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1250,
  /**/

-- 
Save the plankton - eat a whale.

 /// 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: compiler warning in regexp_nfa.c

2019-05-03 Fir de Conversatie Bram Moolenaar


Christian wrote:

> I see the following compiler warning:
> 
> In file included from regexp.c:7939:
> regexp_nfa.c: In function ‘nfa_regmatch’:
> regexp_nfa.c:6519:6: warning: ‘result’ may be used uninitialized in this 
> function [-Wmaybe-uninitialized]
>if (result)
>   ^
> 
> This patch fixes it:
> diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
> index 768bfbb9a..fd71084ec 100644
> --- a/src/regexp_nfa.c
> +++ b/src/regexp_nfa.c
> @@ -5522,7 +5522,7 @@ nfa_regmatch(
>  regsubs_T  *submatch,
>  regsubs_T  *m)
>  {
> -intresult;
> +intresult = 0;
>  size_t size = 0;
>  intflag = 0;
>  intgo_to_nextline = FALSE;

I'll include it, thanks.

-- 
TIM: To the north there lies a cave,  the cave of Caerbannog, wherein, carved
 in mystic runes, upon the very living rock, the last words of Olfin
 Bedwere of Rheged make plain the last resting place of the most Holy
 Grail.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Patch 8.1.1249

2019-05-03 Fir de Conversatie Bram Moolenaar


Patch 8.1.1249
Problem:Compiler warning for uninitialized variable.
Solution:   Initialize it. (Christian Brabandt)
Files:  src/regexp_nfa.c


*** ../vim-8.1.1248/src/regexp_nfa.c2019-03-30 18:46:57.360077328 +0100
--- src/regexp_nfa.c2019-05-03 11:18:15.186623628 +0200
***
*** 5510,5517 
   *
   * When "nfa_endp" is not NULL it is a required end-of-match position.
   *
!  * Return TRUE if there is a match, FALSE otherwise.
   * When there is a match "submatch" contains the positions.
   * Note: Caller must ensure that: start != NULL.
   */
  static int
--- 5510,5519 
   *
   * When "nfa_endp" is not NULL it is a required end-of-match position.
   *
!  * Return TRUE if there is a match, FALSE if there is no match,
!  * NFA_TOO_EXPENSIVE if we end up with too many states.
   * When there is a match "submatch" contains the positions.
+  *
   * Note: Caller must ensure that: start != NULL.
   */
  static int
***
*** 5521,5527 
  regsubs_T *submatch,
  regsubs_T *m)
  {
! int   result;
  size_tsize = 0;
  int   flag = 0;
  int   go_to_nextline = FALSE;
--- 5523,5529 
  regsubs_T *submatch,
  regsubs_T *m)
  {
! int   result = FALSE;
  size_tsize = 0;
  int   flag = 0;
  int   go_to_nextline = FALSE;
*** ../vim-8.1.1248/src/version.c   2019-05-02 23:00:19.227658452 +0200
--- src/version.c   2019-05-03 11:19:50.042148498 +0200
***
*** 769,770 
--- 769,772 
  {   /* Add new patch number below this line */
+ /**/
+ 1249,
  /**/

-- 
TIM: But follow only if you are men of valour.  For the entrance to this cave
 is guarded by a monster, a creature so foul and cruel that no man yet has
 fought with it and lived.  Bones of full fifty men lie strewn about its
 lair ...
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


compiler warning in regexp_nfa.c

2019-05-03 Fir de Conversatie Christian Brabandt
Bram,
I see the following compiler warning:

In file included from regexp.c:7939:
regexp_nfa.c: In function ‘nfa_regmatch’:
regexp_nfa.c:6519:6: warning: ‘result’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
   if (result)
  ^

This patch fixes it:
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 768bfbb9a..fd71084ec 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -5522,7 +5522,7 @@ nfa_regmatch(
 regsubs_T  *submatch,
 regsubs_T  *m)
 {
-intresult;
+intresult = 0;
 size_t size = 0;
 intflag = 0;
 intgo_to_nextline = FALSE;


Best,
Christian
-- 
Das schöne Gefühl, Geld zu haben, ist nicht so intensiv, wie das
Scheißgefühl, kein Geld zu haben.
-- Herbert Achternbusch

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