Re: Patch 8.1.1270
On 05-May-2019 05:09, Bram Moolenaar wrote: Patch 8.1.1270 Problem:Cannot see current match position. Solution: Show "3/44" when using the "n" command and "S" is not in 'shortmess'. (Christian Brabandt, closes #4317) Files: runtime/doc/options.txt, runtime/doc/pattern.txt, src/option.c, src/option.h, src/search.c, src/testdir/Make_all.mak, src/testdir/test_search_stat.vim After this patch, mingw64 (gcc 8.3.1) throws up these warnings: gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return search.c -o objnative/search.o In file included from search.c:13: search.c: In function 'do_search': vim.h:1568:29: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^~ vim.h:1568:29: note: in definition of macro 'STRNCPY' #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^~~ vim.h:1566:23: note: length computed here #define STRLEN(s) strlen((char *)(s)) ^ vim.h:1568:72: note: in definition of macro 'STRNCPY' #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^ search.c:1418:30: note: in expansion of macro 'STRLEN' STRNCPY(msgbuf + 2, p, STRLEN(p)); ^~ vim.h:1568:29: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^~ vim.h:1568:29: note: in definition of macro 'STRNCPY' #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^~~ vim.h:1566:23: note: length computed here #define STRLEN(s) strlen((char *)(s)) ^ vim.h:1568:72: note: in definition of macro 'STRNCPY' #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^ search.c:1421:30: note: in expansion of macro 'STRLEN' STRNCPY(msgbuf + 1, p, STRLEN(p)); ^~ In function 'search_stat', inlined from 'do_search' at search.c:1584:6: vim.h:1568:29: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^~ vim.h:1568:29: note: in definition of macro 'STRNCPY' #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^~~ search.c: In function 'do_search': vim.h:1566:23: note: length computed here #define STRLEN(s) strlen((char *)(s)) ^ vim.h:1568:72: note: in definition of macro 'STRNCPY' #define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), (size_t)(n)) ^ search.c:5009:50: note: in expansion of macro 'STRLEN' STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t)); ^~ Please check the attached patch which tries to correct it. Cheers -- -- 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. --- search.c.orig 2019-05-05 06:14:21.367356400 +1000 +++ search.c2019-05-05 08:32:13.883849000 +1000 @@ -26,7 +26,7 @@ #ifdef FEAT_VIMINFO static void wvsp_one(FILE *fp, int idx, char *s, int sc); #endif -static void search_stat(int dirc, pos_T *pos, char_u *msgbuf); +static void search_stat(int dirc, pos_T *pos, char_u *msgbuf, size_t msgbuf_size); /* * This file contains various searching-related routines. These fall into @@ -1218,7 +1218,7 @@ char_u *strcopy = NULL; char_u *ps; char_u *msgbuf = NULL; -size_t len; +size_t len = 0; /* * A line offset is not remembered, this is vi compatible. @@ -1415,10 +1415,10 @@ { // Use a space to draw the composing char on. msgbuf[1] = ' '; - STRNCPY(msgbuf + 2, p, STRLEN(p)); + STRNCPY(msgbuf + 2, p, len - 2); } else - STRNCPY(msgbuf + 1, p, STRLEN(p)); + STRNCPY(msgbuf + 1, p, len - 1); if (spats[0].off.line || spats[0].off.end || spats[0].off.off) { p = msgbuf + STRLEN(p) + 1; @@ -1581,7 +1581,7 @@ && c != FAIL &&
Patch 8.1.1270
Patch 8.1.1270 Problem:Cannot see current match position. Solution: Show "3/44" when using the "n" command and "S" is not in 'shortmess'. (Christian Brabandt, closes #4317) Files: runtime/doc/options.txt, runtime/doc/pattern.txt, src/option.c, src/option.h, src/search.c, src/testdir/Make_all.mak, src/testdir/test_search_stat.vim *** ../vim-8.1.1269/runtime/doc/options.txt 2019-04-28 18:04:56.054492198 +0200 --- runtime/doc/options.txt 2019-05-04 20:39:29.300113211 +0200 *** *** 1789,1795 'scrolloff' + 0 no scroll offset 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'} 'shiftround'+ off indent not rounded to shiftwidth ! 'shortmess' & ""no shortening of messages 'showcmd' & off command characters not shown 'showmode' & off current mode not shown 'sidescrolloff' + 0 cursor moves to edge of screen in scroll --- 1789,1795 'scrolloff' + 0 no scroll offset 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'} 'shiftround'+ off indent not rounded to shiftwidth ! 'shortmess' & "S" no shortening of messages 'showcmd' & off command characters not shown 'showmode' & off current mode not shown 'sidescrolloff' + 0 cursor moves to edge of screen in scroll *** *** 6563,6570 function to get the effective shiftwidth value. *'shortmess'* *'shm'* ! 'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "", ! POSIX default: "A") global This option helps to avoid all the |hit-enter| prompts caused by file messages, for example with CTRL-G, and to avoid some other messages. --- 6563,6570 function to get the effective shiftwidth value. *'shortmess'* *'shm'* ! 'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S", ! POSIX default: "AS") global This option helps to avoid all the |hit-enter| prompts caused by file messages, for example with CTRL-G, and to avoid some other messages. *** *** 6604,6609 --- 6604,6611 q use "recording" instead of "recording @a" F don't give the file info when editing a file, like `:silent` was used for the command + S do not show search count message when searching, e.g. + "[1/5]" This gives you the opportunity to avoid that a change between buffers requires you to hit , but still gives as useful a message as *** ../vim-8.1.1269/runtime/doc/pattern.txt 2019-01-31 15:34:35.864056935 +0100 --- runtime/doc/pattern.txt 2019-05-04 20:40:26.891793904 +0200 *** *** 152,157 --- 152,168 All matches for the last used search pattern will be highlighted if you set the 'hlsearch' option. This can be suspended with the |:nohlsearch| command. + When 'shortmess' does not include the "S" flag, Vim will automatically show an + index, on which the cursor is. This can look like this: > + + [1/5] Cursor is on first of 5 matches. + [1/>99] Cursor is on first of more than 99 matches. + [>99/>99] Cursor is after 99 match of more than 99 matches. + [?/??] Unknown how many matches exists, generating the + statistics was aborted because of search timeout. + + Note: the count does not take offset into account. + When no match is found you get the error: *E486* Pattern not found Note that for the |:global| command this behaves like a normal message, for Vi compatibility. For the |:s| command the "e" flag can be used to avoid the *** *** 293,298 --- 304,317 the "*" is under your right hand middle finger (search to the right and down). (this depends on your keyboard layout though). + *E956* + In very rare cases a regular expression is used recursively. This can happen + when executing a pattern takes a long time and when checking for messages on + channels a callback is invoked that also uses a pattern or an autocommand is + triggered. In most cases this should be fine, but if a pattern is in use when + it's used again it fails. Usually this means there is something wrong with + the pattern. + == 2. The definition of a pattern*search-pattern* *pattern* *[pattern]*
Patch 8.1.1269
Patch 8.1.1269 Problem:MS-Windows GUI: multibyte chars with a 0x80 byte do not work when compiled with VIMDLL. Solution: Adjust the condition for fixing the input buffer. (Ken Takata, closes #4330) Files: src/getchar.c *** ../vim-8.1.1268/src/getchar.c 2019-05-03 15:13:53.754898750 +0200 --- src/getchar.c 2019-05-04 19:57:35.709453545 +0200 *** *** 3095,3101 /* * Fix typed characters for use by vgetc() and check_termcode(). ! * buf[] must have room to triple the number of bytes! * Returns the new length. */ int --- 3095,3101 /* * Fix typed characters for use by vgetc() and check_termcode(). ! * "buf[]" must have room to triple the number of bytes! * Returns the new length. */ int *** *** 3135,3148 else #endif if (p[0] == NUL || (p[0] == K_SPECIAL ! /* timeout may generate K_CURSORHOLD */ && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD) #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL)) # ifdef VIMDLL ! && !gui.in_use # endif ! /* Win32 console passes modifiers */ ! && (i < 2 || p[1] != KS_MODIFIER) #endif )) { --- 3135,3149 else #endif if (p[0] == NUL || (p[0] == K_SPECIAL ! // timeout may generate K_CURSORHOLD && (i < 2 || p[1] != KS_EXTRA || p[2] != (int)KE_CURSORHOLD) #if defined(MSWIN) && (!defined(FEAT_GUI) || defined(VIMDLL)) + // Win32 console passes modifiers + && ( # ifdef VIMDLL ! gui.in_use || # endif ! (i < 2 || p[1] != KS_MODIFIER)) #endif )) { *** *** 3154,3160 len += 2; } } ! *p = NUL; /* add trailing NUL */ return len; } --- 3155,3161 len += 2; } } ! *p = NUL; // add trailing NUL return len; } *** ../vim-8.1.1268/src/version.c 2019-05-04 19:26:52.865802079 +0200 --- src/version.c 2019-05-04 19:59:19.404816473 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1269, /**/ -- [Another hideous roar.] BEDEVERE: That's it! ARTHUR: What? BEDEVERE: It's The Legendary Black Beast of Arrggghhh! "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.1268
Patch 8.1.1268 Problem:Map completion test fails in GUI. Solution: Skip the test that fails. Files: src/testdir/test_cmdline.vim *** ../vim-8.1.1267/src/testdir/test_cmdline.vim2019-05-03 21:10:32.261521512 +0200 --- src/testdir/test_cmdline.vim2019-05-04 19:26:40.093869561 +0200 *** *** 111,118 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-=< --- 111,120 call feedkeys(":map \[17~x f6x\", 'xt') call feedkeys(":map \\"\", 'xt') call assert_equal('"map ', getreg(':')) ! if !has('gui_running') ! call feedkeys(":map \[17~\\\"\", 'xt') ! call assert_equal("\"map x", getreg(':')) ! endif unmap call feedkeys(":unmap \[17~x\", 'xt') set cpo-=< *** ../vim-8.1.1267/src/version.c 2019-05-04 17:34:30.653353882 +0200 --- src/version.c 2019-05-04 19:24:44.282479634 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1268, /**/ -- BEDEVERE: Oh! LAUNCELOT: No "Arrggghhh ... " at the back of the throat. BEDEVERE: No! "Oh!" in surprise and alarm! "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.1267
Patch 8.1.1267 Problem:Cannot check if GPM mouse support is working. Solution: Add the "mouse_gpm_enable" feature. Files: src/evalfunc.c, src/os_unix.c, src/proto/os_unix.pro, runtime/doc/eval.txt *** ../vim-8.1.1266/src/evalfunc.c 2019-05-04 15:47:25.629423511 +0200 --- src/evalfunc.c 2019-05-04 17:14:45.007701328 +0200 *** *** 6810,6815 --- 6810,6819 else if (STRICMP(name, "netbeans_enabled") == 0) n = netbeans_active(); #endif + #ifdef FEAT_MOUSE_GPM + else if (STRICMP(name, "mouse_gpm_enabled") == 0) + n = gpm_enabled(); + #endif #if defined(FEAT_TERMINAL) && defined(MSWIN) else if (STRICMP(name, "terminal") == 0) n = terminal_enabled(); *** ../vim-8.1.1266/src/os_unix.c 2019-05-04 16:58:41.617537336 +0200 --- src/os_unix.c 2019-05-04 17:32:01.574164411 +0200 *** *** 7022,7028 } #endif /* !HAVE_RENAME */ ! #ifdef FEAT_MOUSE_GPM /* * Initializes connection with gpm (if it isn't already opened) * Return 1 if succeeded (or connection already opened), 0 if failed --- 7022,7028 } #endif /* !HAVE_RENAME */ ! #if defined(FEAT_MOUSE_GPM) || defined(PROTO) /* * Initializes connection with gpm (if it isn't already opened) * Return 1 if succeeded (or connection already opened), 0 if failed *** *** 7059,7070 } /* * Closes connection to gpm */ static void gpm_close(void) { ! if (gpm_flag && gpm_fd >= 0) /* if Open */ Gpm_Close(); } --- 7059,7079 } /* + * Returns TRUE if the GPM mouse is enabled. + */ + int + gpm_enabled(void) + { + return gpm_flag && gpm_fd >= 0; + } + + /* * Closes connection to gpm */ static void gpm_close(void) { ! if (gpm_enabled()) Gpm_Close(); } *** ../vim-8.1.1266/src/proto/os_unix.pro 2019-04-28 22:50:36.157248454 +0200 --- src/proto/os_unix.pro 2019-05-04 17:16:15.015180036 +0200 *** *** 72,77 --- 72,78 int mch_has_exp_wildcard(char_u *p); int mch_has_wildcard(char_u *p); int mch_rename(const char *src, const char *dest); + int gpm_enabled(void); int mch_libcall(char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result); void setup_term_clip(void); void start_xterm_trace(int button); *** ../vim-8.1.1266/runtime/doc/eval.txt2019-05-04 15:47:25.633423491 +0200 --- runtime/doc/eval.txt2019-05-04 17:33:42.425616784 +0200 *** *** 10470,10475 --- 10532,10538 mouse Compiled with support mouse. mouse_dec Compiled with support for Dec terminal mouse. mouse_gpm Compiled with support for gpm (Linux console mouse) + mouse_gpm_enabled GPM mouse is working mouse_netterm Compiled with support for netterm mouse. mouse_pterm Compiled with support for qnx pterm mouse. mouse_sysmouseCompiled with support for sysmouse (*BSD console mouse) *** ../vim-8.1.1266/src/version.c 2019-05-04 17:30:02.502806618 +0200 --- src/version.c 2019-05-04 17:31:16.134410093 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1267, /**/ -- LAUNCELOT: Isn't there a St. Arrggghhh's in Cornwall? ARTHUR:No, that's Saint Ives. "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.1266
Patch 8.1.1266 Problem:Winbar test doesn't test enough. Solution: Check that the WinBar actually shows up. Correct check for clicks with no effect. (Ben Jackson, closes #4338) Files: src/testdir/test_winbar.vim *** ../vim-8.1.1265/src/testdir/test_winbar.vim 2019-05-04 16:06:08.915310869 +0200 --- src/testdir/test_winbar.vim 2019-05-04 17:26:50.707828258 +0200 *** *** 4,13 --- 4,18 finish endif + source shared.vim + func Test_add_remove_menu() new amenu 1.10 WinBar.Next :let g:did_next = 11 amenu 1.20 WinBar.Cont :let g:did_cont = 12 + redraw + call assert_match('NextCont', Screenline(1)) + emenu WinBar.Next call assert_equal(11, g:did_next) emenu WinBar.Cont *** *** 28,33 --- 33,39 amenu 1.20 WinBar.Cont :let g:did_cont = 12 amenu 1.30 WinBar.Close :close redraw + call assert_match('NextContClose', Screenline(1)) let save_mouse = set mouse=a *** *** 38,44 let g:did_next = 0 let g:did_cont = 0 for col in [1, 8, 9, 16, 17, 25, 26] ! call test_setmouse(1, 1) call feedkeys("\", "xt") call assert_equal(0, g:did_next, 'col ' .. col) call assert_equal(0, g:did_cont, 'col ' .. col) --- 44,50 let g:did_next = 0 let g:did_cont = 0 for col in [1, 8, 9, 16, 17, 25, 26] ! call test_setmouse(1, col) call feedkeys("\", "xt") call assert_equal(0, g:did_next, 'col ' .. col) call assert_equal(0, g:did_cont, 'col ' .. col) *** ../vim-8.1.1265/src/version.c 2019-05-04 16:58:41.617537336 +0200 --- src/version.c 2019-05-04 17:29:25.247006408 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1266, /**/ -- ARTHUR: But if he was dying, he wouldn't bother to carve "Arrggghhh". He'd just say it. BROTHER MAYNARD: It's down there carved in stone. GALAHAD: Perhaps he was dictating. "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.1265
Patch 8.1.1265 Problem:When GPM mouse support is enabled double clicks in xterm do not work. Solution: Use KS_GPM_MOUSE for GPM mouse events. Files: src/term.c, src/os_unix.c, src/keymap.h *** ../vim-8.1.1264/src/term.c 2019-05-03 21:10:32.261521512 +0200 --- src/term.c 2019-05-04 16:45:00.727934730 +0200 *** *** 4396,4404 # endif #endif int cpo_koffset; - #ifdef FEAT_MOUSE_GPM - extern intgpm_flag; /* gpm library variable */ - #endif cpo_koffset = (vim_strchr(p_cpo, CPO_KOFFSET) != NULL); --- 4396,4401 *** *** 5122,5127 --- 5119,5127 * If it is a mouse click, get the coordinates. */ if (key_name[0] == KS_MOUSE + # ifdef FEAT_MOUSE_GPM + || key_name[0] == KS_GPM_MOUSE + # endif # ifdef FEAT_MOUSE_JSB || key_name[0] == KS_JSBTERM_MOUSE # endif *** *** 5144,5150 # if !defined(UNIX) || defined(FEAT_MOUSE_XTERM) || defined(FEAT_GUI) \ || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE) ! if (key_name[0] == (int)KS_MOUSE) { /* * For xterm we get "scr", where --- 5144,5154 # if !defined(UNIX) || defined(FEAT_MOUSE_XTERM) || defined(FEAT_GUI) \ || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE) ! if (key_name[0] == KS_MOUSE ! # ifdef FEAT_MOUSE_GPM ! || key_name[0] == KS_GPM_MOUSE ! # endif ! ) { /* * For xterm we get "scr", where *** *** 5274,5282 modifiers = 0; } ! if (key_name[0] == (int)KS_MOUSE # ifdef FEAT_MOUSE_URXVT ! || key_name[0] == (int)KS_URXVT_MOUSE # endif || key_name[0] == KS_SGR_MOUSE || key_name[0] == KS_SGR_MOUSE_RELEASE) --- 5278,5289 modifiers = 0; } ! if (key_name[0] == KS_MOUSE ! # ifdef FEAT_MOUSE_GPM ! || key_name[0] == KS_GPM_MOUSE ! # endif # ifdef FEAT_MOUSE_URXVT ! || key_name[0] == KS_URXVT_MOUSE # endif || key_name[0] == KS_SGR_MOUSE || key_name[0] == KS_SGR_MOUSE_RELEASE) *** *** 5293,5299 && !gui.in_use # endif # ifdef FEAT_MOUSE_GPM ! && gpm_flag == 0 # endif ) { --- 5300,5306 && !gui.in_use # endif # ifdef FEAT_MOUSE_GPM ! && key_name[0] != KS_GPM_MOUSE # endif ) { *** *** 5342,5348 } # endif /* !UNIX || FEAT_MOUSE_XTERM */ # ifdef FEAT_MOUSE_NET ! if (key_name[0] == (int)KS_NETTERM_MOUSE) { int mc, mr; --- 5349,5355 } # endif /* !UNIX || FEAT_MOUSE_XTERM */ # ifdef FEAT_MOUSE_NET ! if (key_name[0] == KS_NETTERM_MOUSE) { int mc, mr; *** *** 5365,5371 } # endif /* FEAT_MOUSE_NET */ # ifdef FEAT_MOUSE_JSB ! if (key_name[0] == (int)KS_JSBTERM_MOUSE) { int mult, val, iter, button, status; --- 5372,5378 } # endif /* FEAT_MOUSE_NET */ # ifdef FEAT_MOUSE_JSB ! if (key_name[0] == KS_JSBTERM_MOUSE) { int mult, val, iter, button, status; *** *** 5489,5495 } # endif /* FEAT_MOUSE_JSB */ # ifdef FEAT_MOUSE_DEC ! if (key_name[0] == (int)KS_DEC_MOUSE) { /* The DEC Locator Input Model * Netterm delivers the code sequence: --- 5496,5502 } # endif /* FEAT_MOUSE_JSB */ # ifdef FEAT_MOUSE_DEC ! if (key_name[0] == KS_DEC_MOUSE) { /* The DEC Locator Input Model * Netterm delivers the code sequence: *** *** 5624,5630 } # endif /* FEAT_MOUSE_DEC */ # ifdef FEAT_MOUSE_PTERM ! if (key_name[0] == (int)KS_PTERM_MOUSE) { int button, num_clicks, action; --- 5631,5637 } # endif /* FEAT_MOUSE_DEC */ # ifdef FEAT_MOUSE_PTERM ! if (key_name[0] == KS_PTERM_MOUSE) { int button, num_clicks, action; *** *** 5705,5718 { # ifdef CHECK_DOUBLE_CLICK # ifdef FEAT_MOUSE_GPM - # ifdef FEAT_GUI /* !* Only for Unix, when GUI or gpm is not active, we handle !* multi-clicks here. */ ! if (gpm_flag == 0 && !gui.in_use) # else ! if (gpm_flag == 0) # endif # else # ifdef FEAT_GUI --- 5712,5725 { # ifdef CHECK_DOUBLE_CLICK #
Patch 8.1.1264
Patch 8.1.1264 Problem:Crash when closing window from WinBar click. (Ben Jackson) Solution: Check that window pointer is still valid. (closes #4337) Files: src/menu.c *** ../vim-8.1.1263/src/menu.c 2019-04-24 23:08:20.078079973 +0200 --- src/menu.c 2019-05-04 16:52:16.192216117 +0200 *** *** 2488,2494 if (col >= item->wb_startcol && col <= item->wb_endcol) { ! win_T *save_curwin = NULL; pos_T save_visual = VIsual; int save_visual_active = VIsual_active; int save_visual_select = VIsual_select; --- 2488,2494 if (col >= item->wb_startcol && col <= item->wb_endcol) { ! win_T *save_curwin = NULL; pos_T save_visual = VIsual; int save_visual_active = VIsual_active; int save_visual_select = VIsual_select; *** *** 2506,2514 check_cursor(); } execute_menu(NULL, item->wb_menu, -1); ! if (save_curwin != NULL) { curwin = save_curwin; curbuf = curwin->w_buffer; --- 2506,2515 check_cursor(); } + // Note: the command might close the current window. execute_menu(NULL, item->wb_menu, -1); ! if (save_curwin != NULL && win_valid(save_curwin)) { curwin = save_curwin; curbuf = curwin->w_buffer; *** *** 2518,2523 --- 2519,2526 VIsual_reselect = save_visual_reselect; VIsual_mode = save_visual_mode; } + if (!win_valid(wp)) + break; } } } *** ../vim-8.1.1263/src/version.c 2019-05-04 16:06:08.915310869 +0200 --- src/version.c 2019-05-04 16:55:03.335008585 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1264, /**/ -- User: I'm having problems with my text editor. Help desk: Which editor are you using? User: I don't know, but it's version VI (pronounced: 6). Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). /// 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():
Elimar Riesebieter wrote: > * Bram Moolenaar [2019-05-04 14:05 +0200]: > > > > > Dominique wrote: > > > Bram Moolenaar wrote: > > > > > > > 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? > > > > > > For me the test error happens even without tmux anyway. > > > Test always fails. > > > I don't know why yet, but this change which comments out > > > a few lines makes the test pass: > > > > > > $ git diff test_termcodes.vim > > > diff --git a/src/testdir/test_termcodes.vim > > > b/src/testdir/test_termcodes.vim > > > index aef9814af..f6e50c2ae 100644 > > > --- a/src/testdir/test_termcodes.vim > > > +++ b/src/testdir/test_termcodes.vim > > > @@ -21,11 +21,11 @@ else > > > endif > > > > > > " netterm only supports left click > > > -if has('mouse_netterm') > > > - let s:ttymouse_netterm = ['netterm'] > > > -else > > > +"if has('mouse_netterm') > > > +" let s:ttymouse_netterm = ['netterm'] > > > +"else > > >let s:ttymouse_netterm = [] > > > -endif > > > +"endif > > > > > > Of course I'm not suggesting we do that, but this just > > > shows that somehow 'netterm' breaks the test. > > > > > > To Bram: could it be that for you :echo has('mouse_netterm') > > > gives 0 so the test would be disabled for you? For me it > > > gives 1. > > > > I do have netterm support, that's how I verified the test works. > > It also passes on CI. > > > > It might be that you have other mouse support interfering. Perhaps > > check them all: > > echo 'mouse: ' .. has('mouse') > > echo 'mouse_dec: ' .. has('mouse_dec') > > echo 'mouse_gpm: ' .. has('mouse_gpm') > > echo 'mouse_netterm: ' .. has('mouse_netterm') > > echo 'mouse_pterm: ' .. has('mouse_pterm') > > echo 'mouse_sysmouse: ' ..has('mouse_sysmouse') > > echo 'mouse_sgr: ' .. has('mouse_sgr') > > echo 'mouse_urxvt: ' .. has('mouse_urxvt') > > echo 'mouse_xterm: ' .. has('mouse_xterm') > > echo 'mouseshape: ' .. has('mouseshape') > > > > I get: > > mouse: 1 > > mouse_dec: 1 > > mouse_gpm: 0 > > mouse_netterm: 1 > > mouse_pterm: 0 > > mouse_sysmouse: 0 > > mouse_sgr: 1 > > mouse_urxvt: 1 > > mouse_xterm: 1 > > mouseshape: 1 > > Well configure with --disable-gpm will pass the test. Let me try installing libgpm-dev... Yep, then I see the test failing. > But does this makes sense on a linux system? For what is mouse_netterm > useful for? We should be able to make this work. Adding gpm support should not break any other mouse. -- Arthur pulls Pin out. The MONK blesses the grenade as ... ARTHUR: (quietly) One, two, five ... GALAHAD: Three, sir! ARTHUR: Three. "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 --
Patch 8.1.1263
Patch 8.1.1263 Problem:Mouse clicks in WinBar not tested. Solution: Add a test for clicking on the WinBar entries. Files: src/testdir/test_winbar.vim *** ../vim-8.1.1262/src/testdir/test_winbar.vim 2017-09-16 22:04:33.0 +0200 --- src/testdir/test_winbar.vim 2019-05-04 16:05:05.855652066 +0200 *** *** 21,23 --- 21,67 aunmenu WinBar.Cont close endfunc + + func Test_click_in_winbar() + new + amenu 1.10 WinBar.Next :let g:did_next = 11 + amenu 1.20 WinBar.Cont :let g:did_cont = 12 + amenu 1.30 WinBar.Close :close + redraw + + let save_mouse = + set mouse=a + + " Columns of the button edges: + " _Next_ _Cont_ _Close_ + " 27 10 15 18 24 + let g:did_next = 0 + let g:did_cont = 0 + for col in [1, 8, 9, 16, 17, 25, 26] + call test_setmouse(1, 1) + call feedkeys("\", "xt") + call assert_equal(0, g:did_next, 'col ' .. col) + call assert_equal(0, g:did_cont, 'col ' .. col) + endfor + + for col in range(2, 7) + let g:did_next = 0 + call test_setmouse(1, col) + call feedkeys("\", "xt") + call assert_equal(11, g:did_next, 'col ' .. col) + endfor + + for col in range(10, 15) + let g:did_cont = 0 + call test_setmouse(1, col) + call feedkeys("\", "xt") + call assert_equal(12, g:did_cont, 'col ' .. col) + endfor + + let wincount = winnr('$') + call test_setmouse(1, 20) + call feedkeys("\", "xt") + call assert_equal(wincount - 1, winnr('$')) + + let = save_mouse + endfunc *** ../vim-8.1.1262/src/version.c 2019-05-04 15:47:25.633423491 +0200 --- src/version.c 2019-05-04 16:03:08.212288693 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1263, /**/ -- MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin, then shalt thou count to three, no more, no less. Three shalt be the number thou shalt count, and the number of the counting shalt be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then lobbest thou thy Holy Hand Grenade of Antioch towards thou foe, who being naughty in my sight, shall snuff it. "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.1262
Patch 8.1.1262 Problem:Cannot simulate a mouse click in a test. Solution: Add test_setmouse(). Files: src/evalfunc.c, runtime/doc/eval.txt, runtime/doc/usr_41.txt *** ../vim-8.1.1261/src/evalfunc.c 2019-05-02 23:00:19.223658473 +0200 --- src/evalfunc.c 2019-05-04 15:35:49.037326346 +0200 *** *** 456,461 --- 456,462 #ifdef FEAT_GUI static void f_test_scrollbar(typval_T *argvars, typval_T *rettv); #endif + static void f_test_setmouse(typval_T *argvars, typval_T *rettv); static void f_test_settime(typval_T *argvars, typval_T *rettv); #ifdef FEAT_FLOAT static void f_tan(typval_T *argvars, typval_T *rettv); *** *** 993,998 --- 994,1000 #ifdef FEAT_GUI {"test_scrollbar",3, 3, f_test_scrollbar}, #endif + {"test_setmouse", 2, 2, f_test_setmouse}, {"test_settime", 1, 1, f_test_settime}, #ifdef FEAT_TIMERS {"timer_info",0, 1, f_timer_info}, *** *** 14494,14499 --- 14496,14508 #endif static void + f_test_setmouse(typval_T *argvars, typval_T *rettv UNUSED) + { + mouse_row = (time_t)tv_get_number([0]) - 1; + mouse_col = (time_t)tv_get_number([1]) - 1; + } + + static void f_test_settime(typval_T *argvars, typval_T *rettv UNUSED) { time_for_testing = (time_t)tv_get_number([0]); *** ../vim-8.1.1261/runtime/doc/eval.txt2019-05-02 23:00:19.227658452 +0200 --- runtime/doc/eval.txt2019-05-04 15:22:45.893532231 +0200 *** *** 2681,2686 --- 2700,2706 test_refcount({expr}) Number get the reference count of {expr} test_scrollbar({which}, {value}, {dragging}) nonescroll in the GUI for testing + test_setmouse({row}, {col}) noneset the mouse position for testing test_settime({expr}) noneset current time for testing timer_info([{id}])Listinformation about timers timer_pause({id}, {pause})nonepause or unpause a timer *** *** 9780,9785 --- 9842,9854 Only works when the {which} scrollbar actually exists, obviously only when using the GUI. + test_setmouse({row}, {col}) *test_setmouse()* + Set the mouse position to be used for the next mouse action. + {row} and {col} are one based. + For example: > + call test_setmouse(4, 20) + call feedkeys("\", "xt") + test_settime({expr}) *test_settime()* Set the time Vim uses internally. Currently only used for timestamps in the history, as they are used in viminfo, and *** ../vim-8.1.1261/runtime/doc/usr_41.txt 2019-04-27 20:36:52.530303581 +0200 --- runtime/doc/usr_41.txt 2019-05-04 15:23:11.301395183 +0200 *** *** 946,951 --- 955,964 test_null_partial() return a null Partial function test_null_string() return a null String test_settime() set the time Vim uses internally + test_setmouse() set the mouse position + test_feedinput()add key sequence to input buffer + test_option_not_set() reset flag indicating option was set + test_scrollbar()simulate scrollbar movement in the GUI Inter-process communication: *channel-functions* ch_canread()check if there is something to read *** ../vim-8.1.1261/src/version.c 2019-05-04 15:05:24.931269287 +0200 --- src/version.c 2019-05-04 15:25:24.732676392 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1262, /**/ -- I wonder, do vegetarians eat fruit bats? /// 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():
* Bram Moolenaar [2019-05-04 14:05 +0200]: > > Dominique wrote: > > Bram Moolenaar wrote: > > > > > 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? > > > > For me the test error happens even without tmux anyway. > > Test always fails. > > I don't know why yet, but this change which comments out > > a few lines makes the test pass: > > > > $ git diff test_termcodes.vim > > diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim > > index aef9814af..f6e50c2ae 100644 > > --- a/src/testdir/test_termcodes.vim > > +++ b/src/testdir/test_termcodes.vim > > @@ -21,11 +21,11 @@ else > > endif > > > > " netterm only supports left click > > -if has('mouse_netterm') > > - let s:ttymouse_netterm = ['netterm'] > > -else > > +"if has('mouse_netterm') > > +" let s:ttymouse_netterm = ['netterm'] > > +"else > >let s:ttymouse_netterm = [] > > -endif > > +"endif > > > > Of course I'm not suggesting we do that, but this just > > shows that somehow 'netterm' breaks the test. > > > > To Bram: could it be that for you :echo has('mouse_netterm') > > gives 0 so the test would be disabled for you? For me it > > gives 1. > > I do have netterm support, that's how I verified the test works. > It also passes on CI. > > It might be that you have other mouse support interfering. Perhaps > check them all: > echo 'mouse: ' .. has('mouse') > echo 'mouse_dec: ' .. has('mouse_dec') > echo 'mouse_gpm: ' .. has('mouse_gpm') > echo 'mouse_netterm: ' .. has('mouse_netterm') > echo 'mouse_pterm: ' .. has('mouse_pterm') > echo 'mouse_sysmouse: ' ..has('mouse_sysmouse') > echo 'mouse_sgr: ' .. has('mouse_sgr') > echo 'mouse_urxvt: ' .. has('mouse_urxvt') > echo 'mouse_xterm: ' .. has('mouse_xterm') > echo 'mouseshape: ' .. has('mouseshape') > > I get: > mouse: 1 > mouse_dec: 1 > mouse_gpm: 0 > mouse_netterm: 1 > mouse_pterm: 0 > mouse_sysmouse: 0 > mouse_sgr: 1 > mouse_urxvt: 1 > mouse_xterm: 1 > mouseshape: 1 Well configure with --disable-gpm will pass the test. But does this makes sense on a linux system? For what is mouse_netterm useful for? Elimar -- Do you smell something burning or is it me? -- -- 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. signature.asc Description: PGP signature
Patch 8.1.1261
Patch 8.1.1261 Problem:No error for quickfix commands with negative range. Solution: Add ADDR_UNSIGNED and use it for quickfix commands. Make assert_fails() show the command if the error doesn't match. Files: src/ex_cmds.h, src/ex_docmd.c, src/testdir/test_quickfix.vim, runtime/doc/quickfix.txt, src/eval.c, src/quickfix.c, src/proto/quickfix.pro, src/ex_cmds2.c *** ../vim-8.1.1260/src/ex_cmds.h 2019-05-03 21:56:31.363540578 +0200 --- src/ex_cmds.h 2019-05-04 14:45:32.177702667 +0200 *** *** 73,80 ADDR_BUFFERS, // buffer number ADDR_TABS, // tab page number ADDR_TABS_RELATIVE,// Tab page that only relative ADDR_QUICKFIX, // quickfix list entry number ! ADDR_OTHER,// something else ADDR_NONE // no range used } cmd_addr_T; #endif --- 73,82 ADDR_BUFFERS, // buffer number ADDR_TABS, // tab page number ADDR_TABS_RELATIVE,// Tab page that only relative + ADDR_QUICKFIX_VALID, // quickfix list valid entry number ADDR_QUICKFIX, // quickfix list entry number ! ADDR_UNSIGNED, // positive count or zero, defaults to 1 ! ADDR_OTHER,// something else, use line number for '$', '%', etc. ADDR_NONE // no range used } cmd_addr_T; #endif *** *** 92,98 * Not supported commands are included to avoid ambiguities. */ #ifdef EX ! # undef EX/* just in case */ #endif #ifdef DO_DECLARE_EXCMD # define EX(a, b, c, d, e) {(char_u *)b, c, (long_u)(d), e} --- 94,100 * Not supported commands are included to avoid ambiguities. */ #ifdef EX ! # undef EX// just in case #endif #ifdef DO_DECLARE_EXCMD # define EX(a, b, c, d, e) {(char_u *)b, c, (long_u)(d), e} *** *** 242,251 ADDR_LINES), EX(CMD_cNext, "cNext",ex_cnext, RANGE|COUNT|TRLBAR|BANG, ! ADDR_OTHER), EX(CMD_cNfile,"cNfile", ex_cnext, RANGE|COUNT|TRLBAR|BANG, ! ADDR_OTHER), EX(CMD_cabbrev, "cabbrev", ex_abbreviate, EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN, ADDR_NONE), --- 244,253 ADDR_LINES), EX(CMD_cNext, "cNext",ex_cnext, RANGE|COUNT|TRLBAR|BANG, ! ADDR_UNSIGNED), EX(CMD_cNfile,"cNfile", ex_cnext, RANGE|COUNT|TRLBAR|BANG, ! ADDR_UNSIGNED), EX(CMD_cabbrev, "cabbrev", ex_abbreviate, EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN, ADDR_NONE), *** *** 253,260 EXTRA|TRLBAR|CMDWIN, ADDR_NONE), EX(CMD_cabove,"cabove", ex_cbelow, ! RANGE|TRLBAR, ! ADDR_OTHER), EX(CMD_caddbuffer,"caddbuffer", ex_cbuffer, RANGE|WORD1|TRLBAR, ADDR_OTHER), --- 255,262 EXTRA|TRLBAR|CMDWIN, ADDR_NONE), EX(CMD_cabove,"cabove", ex_cbelow, ! RANGE|COUNT|TRLBAR, ! ADDR_UNSIGNED), EX(CMD_caddbuffer,"caddbuffer", ex_cbuffer, RANGE|WORD1|TRLBAR, ADDR_OTHER), *** *** 274,287 BANG|RANGE|WORD1|TRLBAR, ADDR_OTHER), EX(CMD_cbelow,"cbelow", ex_cbelow, ! RANGE|TRLBAR, ! ADDR_OTHER), EX(CMD_cbottom, "cbottom", ex_cbottom, TRLBAR, ADDR_NONE), EX(CMD_cc,"cc", ex_cc, RANGE|COUNT|TRLBAR|BANG, ! ADDR_OTHER), EX(CMD_cclose,"cclose", ex_cclose, TRLBAR, ADDR_NONE), --- 276,289 BANG|RANGE|WORD1|TRLBAR, ADDR_OTHER), EX(CMD_cbelow,"cbelow", ex_cbelow, ! RANGE|COUNT|TRLBAR, ! ADDR_UNSIGNED), EX(CMD_cbottom, "cbottom", ex_cbottom, TRLBAR, ADDR_NONE), EX(CMD_cc,"cc", ex_cc, RANGE|COUNT|TRLBAR|BANG, ! ADDR_QUICKFIX), EX(CMD_cclose,"cclose", ex_cclose, TRLBAR, ADDR_NONE), *** *** 290,296
Re: Patch 8.1.1256
Yegappan wrote: > 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. Yeah, I noticed some commands were using RANGE with ADDR_NONE, that doesn't work. ADDR_OTHER is better, but it defaults to using the line number (like that works in the quickfix window to select an quickfix entry, which is a weird combination). Perhaps we should introduce another ADDR_ value for just using a default value of zero and not using the line number. If we want to disallow a negative number at the same time we could use ADDR_POSITIVE. Zero would then also be wrong. Hmm, it turns out ":0cnext" is currently OK, so we should accept zero. But ":-1cnext" is clearly wrong. So we could call it ADDR_UNSIGNED. We should also use this for commands like ":cnext". Currently these also take a count, thus ":2cnext" and ":cnext 2" work. We should make :cabove and friends do the same. I'll make this work. I'm slightly worried that some people were using ".cnext", "$cnext" or similar commands, which will now fail. -- Compilation process failed successfully. /// 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.1260
Patch 8.1.1260 Problem:Comparing with pointer instead of value. Solution: Add a "*". (Ken Takata, closes #4336) Files: src/usercmd.c *** ../vim-8.1.1259/src/usercmd.c 2019-05-03 23:15:34.048180407 +0200 --- src/usercmd.c 2019-05-04 12:39:19.015471736 +0200 *** *** 824,833 emsg(_("E179: argument required for -addr")); return FAIL; } ! if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL) return FAIL; ! if (addr_type_arg != ADDR_LINES) ! *argt |= (ZEROR) ; } else { --- 824,833 emsg(_("E179: argument required for -addr")); return FAIL; } ! if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL) return FAIL; ! if (*addr_type_arg != ADDR_LINES) ! *argt |= ZEROR; } else { *** ../vim-8.1.1259/src/version.c 2019-05-03 23:15:34.048180407 +0200 --- src/version.c 2019-05-04 14:04:33.370371268 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1260, /**/ -- BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One. ANOTHER MONK:And St. Attila raised his hand grenade up on high saying "O Lord bless this thy hand grenade that with it thou mayest blow thine enemies to tiny bits, in thy mercy. "and the Lord did grin and people did feast upon the lambs and sloths and carp and anchovies and orang-utans and breakfast cereals and fruit bats and... BROTHER MAYNARD: Skip a bit brother ... "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.
Re: Found errors in Test_term_mouse_double_click_to_create_tab():
Dominique wrote: > Bram Moolenaar wrote: > > > 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? > > For me the test error happens even without tmux anyway. > Test always fails. > I don't know why yet, but this change which comments out > a few lines makes the test pass: > > $ git diff test_termcodes.vim > diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim > index aef9814af..f6e50c2ae 100644 > --- a/src/testdir/test_termcodes.vim > +++ b/src/testdir/test_termcodes.vim > @@ -21,11 +21,11 @@ else > endif > > " netterm only supports left click > -if has('mouse_netterm') > - let s:ttymouse_netterm = ['netterm'] > -else > +"if has('mouse_netterm') > +" let s:ttymouse_netterm = ['netterm'] > +"else >let s:ttymouse_netterm = [] > -endif > +"endif > > Of course I'm not suggesting we do that, but this just > shows that somehow 'netterm' breaks the test. > > To Bram: could it be that for you :echo has('mouse_netterm') > gives 0 so the test would be disabled for you? For me it > gives 1. I do have netterm support, that's how I verified the test works. It also passes on CI. It might be that you have other mouse support interfering. Perhaps check them all: echo 'mouse: ' .. has('mouse') echo 'mouse_dec: ' .. has('mouse_dec') echo 'mouse_gpm: ' .. has('mouse_gpm') echo 'mouse_netterm: ' .. has('mouse_netterm') echo 'mouse_pterm: ' .. has('mouse_pterm') echo 'mouse_sysmouse: ' ..has('mouse_sysmouse') echo 'mouse_sgr: ' .. has('mouse_sgr') echo 'mouse_urxvt: ' .. has('mouse_urxvt') echo 'mouse_xterm: ' .. has('mouse_xterm') echo 'mouseshape: ' .. has('mouseshape') I get: mouse: 1 mouse_dec: 1 mouse_gpm: 0 mouse_netterm: 1 mouse_pterm: 0 mouse_sysmouse: 0 mouse_sgr: 1 mouse_urxvt: 1 mouse_xterm: 1 mouseshape: 1 -- Lose weight, NEVER Diet again with The "Invisible Weight Loss Patch" (spam e-mail) /// 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():
* Dominique Pellé [2019-05-04 08:46 +0200]: > Bram Moolenaar wrote: > > > 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? > > For me the test error happens even without tmux anyway. > Test always fails. > I don't know why yet, but this change which comments out > a few lines makes the test pass: > > $ git diff test_termcodes.vim > diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim > index aef9814af..f6e50c2ae 100644 > --- a/src/testdir/test_termcodes.vim > +++ b/src/testdir/test_termcodes.vim > @@ -21,11 +21,11 @@ else > endif > > " netterm only supports left click > -if has('mouse_netterm') > - let s:ttymouse_netterm = ['netterm'] > -else > +"if has('mouse_netterm') > +" let s:ttymouse_netterm = ['netterm'] > +"else >let s:ttymouse_netterm = [] > -endif > +"endif > > Of course I'm not suggesting we do that, but this just > shows that somehow 'netterm' breaks the test. > > To Bram: could it be that for you :echo has('mouse_netterm') > gives 0 so the test would be disabled for you? For me it > gives 1. I confirm `:echo has('mouse_netterm')` gives 1 for me too. -- The path to source is always uphill! -unknown- -- -- 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():
Bram Moolenaar wrote: > 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? For me the test error happens even without tmux anyway. Test always fails. I don't know why yet, but this change which comments out a few lines makes the test pass: $ git diff test_termcodes.vim diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index aef9814af..f6e50c2ae 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -21,11 +21,11 @@ else endif " netterm only supports left click -if has('mouse_netterm') - let s:ttymouse_netterm = ['netterm'] -else +"if has('mouse_netterm') +" let s:ttymouse_netterm = ['netterm'] +"else let s:ttymouse_netterm = [] -endif +"endif Of course I'm not suggesting we do that, but this just shows that somehow 'netterm' breaks the test. To Bram: could it be that for you :echo has('mouse_netterm') gives 0 so the test would be disabled for you? For me it gives 1. 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.