Re: Patch 8.0.0105
Bram Moolenaar wrote: > Skywind wrote: > > > Bram Moolenaar wrote: > > > > > You can improve this a lot by changing: > > > > > >if ch_canread(ch) > > > let text = ch_read(ch, {'timeout':0}) > > > caddexpr text > > > cbottom > > > endif > > > > > > To: > > > > > >if ch_canread(ch) > > > while ch_canread(ch) > > > let text = ch_read(ch, {'timeout':0}) > > > caddexpr text > > > endwhile > > > cbottom > > > endif > > > > Yes, I intentionally do so to make reading really slower than writing. > > > > > But, you might still miss some messages if the job exits early. > > > > > > I suppose we will need to add an option to tell Vim that you will read > > > the messages, not using a callback. I think this should do it: > > > > > > "drop"Specifies when to drop messages: > > > "auto" When there is no callback to handle a message. > > > The "close_cb" is also considered for this. > > > "never" All messages will be kept. > > > > > > > It's very nice if I can have the "drop" option in job_start ! > > Should work with patch 8.0.0107. Took a bit of debugging to figure out > why the channel was reported as being closed. I thought messages were > being dropped somewhere, but it turned out to be a problem with > ch_canread(). > Finally, thanks very much :D -- -- 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] added tests for pasting in command line using CTRL-R
Hi Pasting in command line with CTRL-R is currently not tested according to coveralls: https://coveralls.io/builds/9083549/source?filename=src%2Fex_getln.c#L3181 Attached patch adds a test for it. It should exercise at least those functions which are entirely red in coveralls i.e not tested: cmdline_paste(...) in ex_getln.c cmdline_paste_str(...) in ex_getln.c cmdline_paste_reg(...) in ops.c 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. diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 3718087..177da34 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -194,3 +194,9 @@ func Test_expand_star_star() bwipe! call delete('a', 'rf') endfunc + +func Test_paste_in_cmdline() + let @a = "def" + call feedkeys(":abc \a ghi\\"\", 'tx') + call assert_equal('"abc def ghi', @:) +endfunc
Patch 8.0.0118
Patch 8.0.0118 Problem:"make proto" adds extra function prototype. Solution: Add #ifdef. Files: src/misc2.c *** ../vim-8.0.0117/src/misc2.c 2016-12-01 17:25:16.791864646 +0100 --- src/misc2.c 2016-12-01 23:01:08.205892509 +0100 *** *** 6243,6249 } #endif ! #ifdef ELAPSED_TIMEVAL /* no PROTO here, proto is defined in vim.h */ /* * Return time in msec since "start_tv". */ --- 6243,6250 } #endif ! #ifndef PROTO /* proto is defined in vim.h */ ! # ifdef ELAPSED_TIMEVAL /* * Return time in msec since "start_tv". */ *** *** 6256,6264 return (now_tv.tv_sec - start_tv->tv_sec) * 1000L + (now_tv.tv_usec - start_tv->tv_usec) / 1000L; } ! #endif ! #ifdef ELAPSED_TICKCOUNT /* * Return time in msec since "start_tick". */ --- 6257,6265 return (now_tv.tv_sec - start_tv->tv_sec) * 1000L + (now_tv.tv_usec - start_tv->tv_usec) / 1000L; } ! # endif ! # ifdef ELAPSED_TICKCOUNT /* * Return time in msec since "start_tick". */ *** *** 6269,6272 --- 6270,6274 return (long)now - (long)start_tick; } + # endif #endif *** ../vim-8.0.0117/src/version.c 2016-12-01 21:46:09.860509973 +0100 --- src/version.c 2016-12-01 22:58:45.350872130 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 118, /**/ -- hundred-and-one symptoms of being an internet addict: 76. Your ISP regards you as a business partner rather than as a customer. /// 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.0.0117
Patch 8.0.0117 Problem:Parallel make fails. (J. Lewis Muir) Solution: Make sure the objects directory exists. (closes #1259) Files: src/Makefile *** ../vim-8.0.0116/src/Makefile2016-12-01 18:47:06.595684409 +0100 --- src/Makefile2016-12-01 21:45:02.864966952 +0100 *** *** 1684,1704 objects/memfile.o \ objects/message.o ! JSON_TEST_OBJ = $(OBJ_COMMON) \ objects/memfile.o \ objects/message.o \ objects/json_test.o ! MEMFILE_TEST_OBJ = $(OBJ_COMMON) \ objects/json.o \ objects/message.o \ objects/memfile_test.o ! MESSAGE_TEST_OBJ = $(OBJ_COMMON) \ objects/json.o \ objects/memfile.o \ objects/message_test.o PRO_AUTO = \ arabic.pro \ blowfish.pro \ --- 1684,1713 objects/memfile.o \ objects/message.o ! OBJ_JSON_TEST = \ objects/memfile.o \ objects/message.o \ objects/json_test.o ! JSON_TEST_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST) ! ! OBJ_MEMFILE_TEST = \ objects/json.o \ objects/message.o \ objects/memfile_test.o ! MEMFILE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MEMFILE_TEST) ! ! OBJ_MESSAGE_TEST = \ objects/json.o \ objects/memfile.o \ objects/message_test.o + MESSAGE_TEST_OBJ = $(OBJ_COMMON) $(OBJ_MESSAGE_TEST) + + ALL_OBJ = $(OBJ_COMMON) $(OBJ_JSON_TEST) $(OBJ_MEMFILE_TEST) $(OBJ_MESSAGE_TEST) + + PRO_AUTO = \ arabic.pro \ blowfish.pro \ *** *** 2853,2860 # commands understand putting object files in another directory, it must be # specified for each file separately. ! objects: ! mkdir objects objects/arabic.o: arabic.c $(CCC) -o $@ arabic.c --- 2862,2875 # commands understand putting object files in another directory, it must be # specified for each file separately. ! objects objects/.dirstamp: ! mkdir -p objects ! touch objects/.dirstamp ! ! # All object files depend on the objects directory, so that parallel make ! # works. Can't depend on the directory itself, its timestamp changes all the ! # time. ! $(ALL_OBJ): objects/.dirstamp objects/arabic.o: arabic.c $(CCC) -o $@ arabic.c *** ../vim-8.0.0116/src/version.c 2016-12-01 21:32:28.678025257 +0100 --- src/version.c 2016-12-01 21:43:16.501686971 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 117, /**/ -- hundred-and-one symptoms of being an internet addict: 75. You start wondering whether you could actually upgrade your brain with a Pentium Pro microprocessor 80. The upgrade works just fine. /// 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.0.0116
Patch 8.0.0116 Problem:When reading English help and using CTRl-] the language from 'helplang' is used. Solution: Make help tag jumps keep the language. (Tatsuki, test by Hirohito Higashi, closes #1249) Files: src/tag.c, src/testdir/test_help_tagjump.vim *** ../vim-8.0.0115/src/tag.c 2016-12-01 17:25:16.795864620 +0100 --- src/tag.c 2016-12-01 21:25:07.384984712 +0100 *** *** 742,748 /* skip backslash used for escaping a command char or * a backslash */ if (*p == '\\' && (*(p + 1) == *tagp.command ! || *(p + 1) == '\\')) ++p; if (*p == TAB) --- 742,748 /* skip backslash used for escaping a command char or * a backslash */ if (*p == '\\' && (*(p + 1) == *tagp.command ! || *(p + 1) == '\\')) ++p; if (*p == TAB) *** *** 1356,1361 --- 1356,1362 char_u*help_lang_find = NULL; /* lang to be found */ char_uhelp_lang[3]; /* lang of current tags file */ char_u*saved_pat = NULL; /* copy of pat[] */ + int is_txt = FALSE; /* flag of file extension */ #endif pat_T orgpat; /* holds unconverted pattern info */ *** *** 1388,1394 */ switch (curbuf->b_tc_flags ? curbuf->b_tc_flags : tc_flags) { ! case TC_FOLLOWIC:break; case TC_IGNORE:p_ic = TRUE; break; case TC_MATCH: p_ic = FALSE; break; case TC_FOLLOWSCS: p_ic = ignorecase(pat); break; --- 1389,1395 */ switch (curbuf->b_tc_flags ? curbuf->b_tc_flags : tc_flags) { ! case TC_FOLLOWIC:break; case TC_IGNORE:p_ic = TRUE; break; case TC_MATCH: p_ic = FALSE; break; case TC_FOLLOWSCS: p_ic = ignorecase(pat); break; *** *** 1476,1481 --- 1477,1491 * When the tag file is case-fold sorted, it is either one or the other. * Only ignore case when TAG_NOIC not used or 'ignorecase' set. */ + #ifdef FEAT_MULTI_LANG + /* Set a flag if the file extension is .txt */ + if ((flags & TAG_KEEP_LANG) + && help_lang_find == NULL + && curbuf->b_fname != NULL + && (i = (int)STRLEN(curbuf->b_fname)) > 4 + && STRICMP(curbuf->b_fname + i - 4, ".txt") == 0) + is_txt = TRUE; + #endif #ifdef FEAT_TAG_BINS orgpat.regmatch.rm_ic = ((p_ic || !noic) && (findall || orgpat.headlen == 0 || !p_tbs)); *** *** 1509,1522 #ifdef FEAT_MULTI_LANG if (curbuf->b_help) { ! /* Prefer help tags according to 'helplang'. Put the !* two-letter language name in help_lang[]. */ ! i = (int)STRLEN(tag_fname); ! if (i > 3 && tag_fname[i - 3] == '-') ! STRCPY(help_lang, tag_fname + i - 2); ! else STRCPY(help_lang, "en"); ! /* When searching for a specific language skip tags files * for other languages. */ if (help_lang_find != NULL --- 1519,1537 #ifdef FEAT_MULTI_LANG if (curbuf->b_help) { ! /* Keep en if the file extension is .txt*/ ! if (is_txt) STRCPY(help_lang, "en"); ! else ! { ! /* Prefer help tags according to 'helplang'. Put the !* two-letter language name in help_lang[]. */ ! i = (int)STRLEN(tag_fname); ! if (i > 3 && tag_fname[i - 3] == '-') ! STRCPY(help_lang, tag_fname + i - 2); ! else ! STRCPY(help_lang, "en"); ! } /* When searching for a specific language skip tags files * for other languages. */ if (help_lang_find != NULL *** ../vim-8.0.0115/src/testdir/test_help_tagjump.vim 2016-11-17 19:44:56.623679016 +0100 --- src/testdir/test_help_tagjump.vim 2016-12-01 21:23:59.121442847 +0100 *** *** 141,144 --- 141,176 endtry endfunc + func Test_help_respect_current_file_lang() + try + let list = [] + call s:doc_config_setup() + + if has('multi_lang') + function s:check_help_file_ext(help_keyword, ext) + exec 'help ' . a:help_keyword + call assert_equal(a:ext, expand('%:e')) + call feedkeys("\", 'tx') + call assert_equal(a:ext, expand('%:e')) + pop + helpclose + endfunc +
Patch 8.0.0115
Patch 8.0.0115 Problem:When building with Cygwin libwinpthread isn't found. Solution: Link winpthread statically. (jmmerz, closes #1255, closes #1256) Files: src/Make_cyg_ming.mak *** ../vim-8.0.0114/src/Make_cyg_ming.mak 2016-09-08 20:25:34.0 +0200 --- src/Make_cyg_ming.mak 2016-12-01 20:36:04.852560447 +0100 *** *** 81,86 --- 81,93 STATIC_STDCPLUS=no endif + + # Link against the shared version of libwinpthread by default. Set + # STATIC_WINPTHREAD to "yes" to link against static version instead. + ifndef STATIC_WINPTHREAD + STATIC_WINPTHREAD=$(STATIC_STDCPLUS) + endif + # If the user doesn't want gettext, undefine it. ifeq (no, $(GETTEXT)) GETTEXT= *** *** 817,822 --- 824,833 endif endif + ifeq (yes, $(STATIC_WINPTHREAD)) + LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic + endif + all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll vimrun.exe: vimrun.c *** ../vim-8.0.0114/src/version.c 2016-12-01 20:32:23.958023740 +0100 --- src/version.c 2016-12-01 20:36:35.892354699 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 115, /**/ -- hundred-and-one symptoms of being an internet addict: 73. You give your dog used motherboards instead of bones /// 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.0.0114
Patch 8.0.0114 Problem:Coding style not optimal. Solution: Add spaces. (Ken Takata) Files: src/gui_w32.c, src/os_mswin.c *** ../vim-8.0.0113/src/gui_w32.c 2016-12-01 20:18:47.243420047 +0100 --- src/gui_w32.c 2016-12-01 20:31:04.638547599 +0100 *** *** 3551,3562 filterp = convert_filterW(filter); vim_memset(&fileStruct, 0, sizeof(OPENFILENAMEW)); ! #ifdef OPENFILENAME_SIZE_VERSION_400W /* be compatible with Windows NT 4.0 */ fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W; ! #else fileStruct.lStructSize = sizeof(fileStruct); ! #endif if (title != NULL) titlep = enc_to_utf16(title, NULL); --- 3551,3562 filterp = convert_filterW(filter); vim_memset(&fileStruct, 0, sizeof(OPENFILENAMEW)); ! # ifdef OPENFILENAME_SIZE_VERSION_400W /* be compatible with Windows NT 4.0 */ fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400W; ! # else fileStruct.lStructSize = sizeof(fileStruct); ! # endif if (title != NULL) titlep = enc_to_utf16(title, NULL); *** *** 3593,3602 * Don't use OFN_OVERWRITEPROMPT, Vim has its own ":confirm" dialog. */ fileStruct.Flags = (OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY); ! #ifdef FEAT_SHORTCUT if (curbuf->b_p_bin) fileStruct.Flags |= OFN_NODEREFERENCELINKS; ! #endif if (saving) { if (!GetSaveFileNameW(&fileStruct)) --- 3593,3602 * Don't use OFN_OVERWRITEPROMPT, Vim has its own ":confirm" dialog. */ fileStruct.Flags = (OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY); ! # ifdef FEAT_SHORTCUT if (curbuf->b_p_bin) fileStruct.Flags |= OFN_NODEREFERENCELINKS; ! # endif if (saving) { if (!GetSaveFileNameW(&fileStruct)) *** ../vim-8.0.0113/src/os_mswin.c 2016-11-10 17:10:47.494177267 +0100 --- src/os_mswin.c 2016-12-01 20:31:04.638547599 +0100 *** *** 40,46 # include # include # include ! #endif #endif /* PROTO */ --- 40,46 # include # include # include ! # endif #endif /* PROTO */ *** *** 1619,1625 if (psettings->n_uncollated_copies == 0) psettings->n_uncollated_copies = 1; ! } else { psettings->n_collated_copies = 1; psettings->n_uncollated_copies = 1; } --- 1619,1627 if (psettings->n_uncollated_copies == 0) psettings->n_uncollated_copies = 1; ! } ! else ! { psettings->n_collated_copies = 1; psettings->n_uncollated_copies = 1; } *** ../vim-8.0.0113/src/version.c 2016-12-01 20:18:47.243420047 +0100 --- src/version.c 2016-12-01 20:31:31.502370175 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 114, /**/ -- "Thou shalt not follow the Null Pointer, for at its end Chaos and Madness lie." /// 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.0.0113
Patch 8.0.0113 Problem:MS-Windows: message box to prompt for saving changes may appear on the wrong monitor. Solution: Adjust the CenterWindow function. (Ken Takata) Files: src/gui_w32.c *** ../vim-8.0.0112/src/gui_w32.c 2016-11-10 20:01:41.193582919 +0100 --- src/gui_w32.c 2016-12-01 20:16:47.184213794 +0100 *** *** 2297,2315 # define GetTextWidthEnc(h, s, l) GetTextWidth((h), (s), (l)) #endif /* * A quick little routine that will center one window over another, handy for ! * dialog boxes. Taken from the Win32SDK samples. */ static BOOL CenterWindow( HWND hwndChild, HWND hwndParent) { ! RECTrChild, rParent; ! int wChild, hChild, wParent, hParent; ! int wScreen, hScreen, xNew, yNew; ! HDC hdc; GetWindowRect(hwndChild, &rChild); wChild = rChild.right - rChild.left; --- 2297,2320 # define GetTextWidthEnc(h, s, l) GetTextWidth((h), (s), (l)) #endif + static void get_work_area(RECT *spi_rect); + /* * A quick little routine that will center one window over another, handy for ! * dialog boxes. Taken from the Win32SDK samples and modified for multiple ! * monitors. */ static BOOL CenterWindow( HWND hwndChild, HWND hwndParent) { ! HMONITOR mon; ! MONITORINFO moninfo; ! RECT rChild, rParent, rScreen; ! int wChild, hChild, wParent, hParent; ! int xNew, yNew; ! HDC hdc; GetWindowRect(hwndChild, &rChild); wChild = rChild.right - rChild.left; *** *** 2317,2348 /* If Vim is minimized put the window in the middle of the screen. */ if (hwndParent == NULL || IsMinimized(hwndParent)) ! SystemParametersInfo(SPI_GETWORKAREA, 0, &rParent, 0); else GetWindowRect(hwndParent, &rParent); wParent = rParent.right - rParent.left; hParent = rParent.bottom - rParent.top; ! hdc = GetDC(hwndChild); ! wScreen = GetDeviceCaps (hdc, HORZRES); ! hScreen = GetDeviceCaps (hdc, VERTRES); ! ReleaseDC(hwndChild, hdc); ! ! xNew = rParent.left + ((wParent - wChild) /2); ! if (xNew < 0) { ! xNew = 0; } ! else if ((xNew+wChild) > wScreen) { ! xNew = wScreen - wChild; ! } ! ! yNew = rParent.top+ ((hParent - hChild) /2); ! if (yNew < 0) ! yNew = 0; ! else if ((yNew+hChild) > hScreen) ! yNew = hScreen - hChild; return SetWindowPos(hwndChild, NULL, xNew, yNew, 0, 0, SWP_NOSIZE | SWP_NOZORDER); --- 2322,2360 /* If Vim is minimized put the window in the middle of the screen. */ if (hwndParent == NULL || IsMinimized(hwndParent)) ! get_work_area(&rParent); else GetWindowRect(hwndParent, &rParent); wParent = rParent.right - rParent.left; hParent = rParent.bottom - rParent.top; ! moninfo.cbSize = sizeof(MONITORINFO); ! mon = MonitorFromWindow(hwndChild, MONITOR_DEFAULTTOPRIMARY); ! if (mon != NULL && GetMonitorInfo(mon, &moninfo)) { ! rScreen = moninfo.rcWork; } ! else { ! hdc = GetDC(hwndChild); ! rScreen.left = 0; ! rScreen.top = 0; ! rScreen.right = GetDeviceCaps(hdc, HORZRES); ! rScreen.bottom = GetDeviceCaps(hdc, VERTRES); ! ReleaseDC(hwndChild, hdc); ! } ! ! xNew = rParent.left + ((wParent - wChild) / 2); ! if (xNew < rScreen.left) ! xNew = rScreen.left; ! else if ((xNew + wChild) > rScreen.right) ! xNew = rScreen.right - wChild; ! ! yNew = rParent.top + ((hParent - hChild) / 2); ! if (yNew < rScreen.top) ! yNew = rScreen.top; ! else if ((yNew + hChild) > rScreen.bottom) ! yNew = rScreen.bottom - hChild; return SetWindowPos(hwndChild, NULL, xNew, yNew, 0, 0, SWP_NOSIZE | SWP_NOZORDER); *** *** 5559,5565 MONITORINFO moninfo; /* work out which monitor the window is on, and get *it's* work area */ ! mon = MonitorFromWindow(s_hwnd, 1 /*MONITOR_DEFAULTTOPRIMARY*/); if (mon != NULL) { moninfo.cbSize = sizeof(MONITORINFO); --- 5571,5577 MONITORINFO moninfo; /* work out which monitor the window is on, and get *it's* work area */ ! mon = MonitorFromWindow(s_hwnd, MONITOR_DEFAULTTOPRIMARY); if (mon != NULL) { moninfo.cbSize = sizeof(MONITORINFO); *** ../vim-8.0.0112/src/version.c 2016-12-01 18:47:06.595684409 +0100 --- src/version.c 2016-12-01 20:18:09.215671446 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 113, /**/ -- hundred-and-one symptoms of being an internet addict: 72. Somebody at IRC just menti
Patch 8.0.0112
Patch 8.0.0112 Problem:Tests 92 and 93 are old style. Solution: Make test92 and test93 new style. (Hirohito Higashi, closes #1289) Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms, src/testdir/test92.in, src/testdir/test92.ok, src/testdir/test93.in, src/testdir/test93.ok, src/testdir/test_mksession.vim, src/testdir/test_mksession_utf8.vim *** ../vim-8.0.0111/src/Makefile2016-11-17 19:32:17.897024245 +0100 --- src/Makefile2016-12-01 18:14:12.212658597 +0100 *** *** 2052,2058 test60 test64 test65 test66 test67 test68 test69 \ test70 test72 test73 test74 test75 test77 test78 test79 \ test80 test82 test83 test84 test85 test86 test87 test88 test89 \ ! test90 test91 test92 test93 test94 test95 test97 test98 test99 \ test100 test101 test103 test104 test107 test108: cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) --- 2061,2067 test60 test64 test65 test66 test67 test68 test69 \ test70 test72 test73 test74 test75 test77 test78 test79 \ test80 test82 test83 test84 test85 test86 test87 test88 test89 \ ! test90 test91 test94 test95 test97 test98 test99 \ test100 test101 test103 test104 test107 test108: cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) *** *** 2118,2123 --- 2127,2134 test_matchadd_conceal_utf8 \ test_menu \ test_messages \ + test_mksession \ + test_mksession_utf8 \ test_nested_function \ test_netbeans \ test_normal \ *** ../vim-8.0.0111/src/testdir/Make_all.mak2016-11-17 19:32:17.897024245 +0100 --- src/testdir/Make_all.mak2016-12-01 18:14:12.212658597 +0100 *** *** 63,70 test88.out \ test90.out \ test91.out \ - test92.out \ - test93.out \ test94.out \ test95.out \ test98.out \ --- 63,68 *** *** 167,172 --- 165,172 test_man.res \ test_marks.res \ test_matchadd_conceal.res \ + test_mksession.res \ + test_mksession_utf8.res \ test_nested_function.res \ test_netbeans.res \ test_normal.res \ *** ../vim-8.0.0111/src/testdir/Make_vms.mms2016-11-04 20:35:27.352945991 +0100 --- src/testdir/Make_vms.mms2016-12-01 18:14:12.216658571 +0100 *** *** 92,98 test72.out test75.out \ test77a.out test78.out test79.out test80.out \ test82.out test84.out test88.out test89.out \ !test90.out test91.out test92.out test93.out test94.out \ test95.out test98.out test99.out \ test103.out test104.out \ test107.out test108.out\ --- 92,98 test72.out test75.out \ test77a.out test78.out test79.out test80.out \ test82.out test84.out test88.out test89.out \ !test90.out test91.out test94.out \ test95.out test98.out test99.out \ test103.out test104.out \ test107.out test108.out\ *** ../vim-8.0.0111/src/testdir/test92.in 2013-09-22 14:45:06.0 +0200 --- src/testdir/test92.in 1970-01-01 01:00:00.0 +0100 *** *** 1,48 - vim: set ft=vim fenc=utf-8: - - Tests if :mksession saves cursor columns correctly in presence of tab and - multibyte characters when fileencoding=utf-8. - - STARTTEST - :so mbyte.vim - :if !has('mksession') - : e! test.ok - : wq! test.out - :endif - :set sessionoptions=buffers splitbelow fileencoding=utf-8 - /^start: - :vsplit - j16|:split - j16|:split - j16|:split - j8|:split - j8|:split - j16|:split - j16|:split - j16|:wincmd l - /^start: - :set nowrap - j16|3zl:split - j016|3zl:split - j016|3zl:split - j08|3zl:split - j08|3zl:split - j016|3zl:split - j016|3zl:split - j016|3zl:split - :mksession! test.out - :new test.out - :v/\(^ *normal! 0\|^ *exe 'normal!\)/d - :w! test.out - :qa! - ENDTEST - - start: - no multibyte chAracter - one leaDing tab - four leadinG spaces - two consecutive tabs - two tabsin one line - one … multibyteCharacter - a “b†two multiByte characters - “c†1€ three mulTibyte characters --- 0 *** ../vim-8.0.0111/src/testdir/test92.ok 2013-02-26 17:13:48.0 +0100 --- src/testdir/test92.ok 1970-01-01 01:00:00.0 +0100 *** *** 1,26 - normal! 016| - normal! 016| - normal! 016| - normal! 08| - normal! 08| - normal! 016| - normal! 016| - normal! 016| - exe 'normal! ' . s:c . '|zs' . 16 . '|' - normal! 016| - exe 'normal! ' . s:c . '|zs' . 16 . '|' - normal! 016| - exe 'normal! ' . s:c . '|zs' . 16 . '|' - normal! 016| - exe 'normal! ' . s:c . '|zs' . 8 . '|' - no
Patch 8.0.0111
Patch 8.0.0111 Problem:The :history command is not tested. Solution: Add tests. (Dominique Pelle) Files: runtime/doc/cmdline.txt, src/testdir/test_history.vim *** ../vim-8.0.0110/runtime/doc/cmdline.txt 2016-09-12 12:45:25.0 +0200 --- runtime/doc/cmdline.txt 2016-12-01 17:56:02.967807544 +0100 *** *** 358,365 List entries 6 to 12 from the search history: > :history / 6,12 < ! List the recent five entries from all histories: > ! :history all -5, :keepp[atterns] {command} *:keepp* *:keeppatterns* Execute {command}, without adding anything to the search --- 359,369 List entries 6 to 12 from the search history: > :history / 6,12 < ! List the penultimate entry from all histories: > ! :history all -2 ! < ! List the most recent two entries from all histories: > ! :history all -2, :keepp[atterns] {command} *:keepp* *:keeppatterns* Execute {command}, without adding anything to the search *** ../vim-8.0.0110/src/testdir/test_history.vim2016-03-05 20:59:45.0 +0100 --- src/testdir/test_history.vim2016-12-01 17:56:02.967807544 +0100 *** *** 31,36 --- 31,60 call assert_equal('ls', histget(a:hist, -1)) call assert_equal(4, histnr(a:hist)) + let a=execute('history ' . a:hist) + call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a) + let a=execute('history all') + call assert_match("^\n # .* history\n 3 buffers\n> 4 ls", a) + + if len(a:hist) > 0 + let a=execute('history ' . a:hist . ' 2') + call assert_match("^\n # \\S* history$", a) + let a=execute('history ' . a:hist . ' 3') + call assert_match("^\n # \\S* history\n 3 buffers$", a) + let a=execute('history ' . a:hist . ' 4') + call assert_match("^\n # \\S* history\n> 4 ls$", a) + let a=execute('history ' . a:hist . ' 3,4') + call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a) + let a=execute('history ' . a:hist . ' -1') + call assert_match("^\n # \\S* history\n> 4 ls$", a) + let a=execute('history ' . a:hist . ' -2') + call assert_match("^\n # \\S* history\n 3 buffers$", a) + let a=execute('history ' . a:hist . ' -2,') + call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a) + let a=execute('history ' . a:hist . ' -3') + call assert_match("^\n # \\S* history$", a) + endif + " Test for removing entries matching a pattern for i in range(1, 3) call histadd(a:hist, 'text_' . i) *** ../vim-8.0.0110/src/version.c 2016-12-01 17:48:24.914803033 +0100 --- src/version.c 2016-12-01 17:56:32.831612262 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 111, /**/ -- hundred-and-one symptoms of being an internet addict: 70. ISDN lines are added to your house on a hourly basis /// 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.0.0110
Patch 8.0.0110 Problem:Drop command doesn't use existing window. Solution: Check the window width properly. (Hirohito Higashi) Files: src/buffer.c, src/testdir/test_tabpage.vim *** ../vim-8.0.0109/src/buffer.c2016-11-10 18:16:30.077477227 +0100 --- src/buffer.c2016-12-01 17:37:29.307089016 +0100 *** *** 4858,4865 wpnext = wp->w_next; buf = wp->w_buffer; if (buf->b_ffname == NULL ! || (!keep_tabs && buf->b_nwindows > 1) ! || wp->w_width != Columns) i = opened_len; else { --- 4858,4865 wpnext = wp->w_next; buf = wp->w_buffer; if (buf->b_ffname == NULL ! || (!keep_tabs && (buf->b_nwindows > 1 ! || wp->w_width != Columns))) i = opened_len; else { *** ../vim-8.0.0109/src/testdir/test_tabpage.vim2016-10-12 17:52:39.199701825 +0200 --- src/testdir/test_tabpage.vim2016-12-01 17:36:45.351375597 +0100 *** *** 65,70 --- 65,79 call assert_true(tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1) tabclose q + " + " + " Test for ":tab drop vertical-split-window" to jump test1 buffer + tabedit test1 + vnew + tabfirst + tab drop test1 + call assert_equal([2, 2, 2, 2], [tabpagenr('$'), tabpagenr(), tabpagewinnr(2, '$'), tabpagewinnr(2)]) + 1tabonly endif " " *** ../vim-8.0.0109/src/version.c 2016-12-01 17:25:16.795864620 +0100 --- src/version.c 2016-12-01 17:47:54.399002614 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 110, /**/ -- hundred-and-one symptoms of being an internet addict: 69. Yahoo welcomes you with your own start page /// 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.0.0109
Patch 8.0.0109 Problem:Still checking if memcmp() exists while every system should have it now. Solution: Remove vim_memcmp(). (James McCoy, closes #1295) Files: src/config.h.in, src/configure.ac, src/misc2.c, src/os_vms_conf.h, src/osdef1.h.in, src/search.c, src/tag.c, src/vim.h *** ../vim-8.0.0108/src/config.h.in 2016-11-12 21:12:48.538182233 +0100 --- src/config.h.in 2016-12-01 17:08:35.738390168 +0100 *** *** 154,160 #undef BAD_GETCWD /* Define if you the function: */ - #undef HAVE_BCMP #undef HAVE_FCHDIR #undef HAVE_FCHOWN #undef HAVE_FSEEKO --- 154,159 *** *** 170,176 #undef HAVE_ICONV #undef HAVE_NL_LANGINFO_CODESET #undef HAVE_LSTAT - #undef HAVE_MEMCMP #undef HAVE_MEMSET #undef HAVE_MKDTEMP #undef HAVE_NANOSLEEP --- 169,174 *** ../vim-8.0.0108/src/configure.ac2016-11-12 21:12:48.534182259 +0100 --- src/configure.ac2016-12-01 17:08:35.742390142 +0100 *** *** 3594,3601 dnl Check for functions in one big call, to reduce the size of configure. dnl Can only be used for functions that do not require any include. ! AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \ ! getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ --- 3594,3601 dnl Check for functions in one big call, to reduce the size of configure. dnl Can only be used for functions that do not require any include. ! AC_CHECK_FUNCS(fchdir fchown fsync getcwd getpseudotty \ ! getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ *** ../vim-8.0.0108/src/misc2.c 2016-11-26 15:13:29.410218034 +0100 --- src/misc2.c 2016-12-01 17:08:35.742390142 +0100 *** *** 1740,1766 } #endif - #ifdef VIM_MEMCMP - /* - * Return zero when "b1" and "b2" are the same for "len" bytes. - * Return non-zero otherwise. - */ - int - vim_memcmp(void *b1, void *b2, size_t len) - { - char_u *p1 = (char_u *)b1, *p2 = (char_u *)b2; - - for ( ; len > 0; --len) - { - if (*p1 != *p2) - return 1; - ++p1; - ++p2; - } - return 0; - } - #endif - /* skipped when generating prototypes, the prototype is in vim.h */ #ifdef VIM_MEMMOVE /* --- 1740,1745 *** ../vim-8.0.0108/src/os_vms_conf.h 2016-11-04 20:35:27.352945991 +0100 --- src/os_vms_conf.h 2016-12-01 17:08:35.742390142 +0100 *** *** 101,107 #define HAVE_STRTOL #define HAVE_TGETENT #define HAVE_MEMSET - #define HAVE_MEMCMP #define HAVE_STRERROR #define HAVE_FCHOWN #define HAVE_RENAME --- 101,106 *** ../vim-8.0.0108/src/osdef1.h.in 2016-01-23 22:35:31.0 +0100 --- src/osdef1.h.in 2016-12-01 17:08:35.742390142 +0100 *** *** 50,61 #ifdef HAVE_MEMSET extern void *memset(void *, int, size_t); #endif - #ifdef HAVE_BCMP - extern intbcmp(void *, void *, size_t); - #endif - #ifdef HAVE_MEMCMP extern intmemcmp(const void *, const void *, size_t); - #endif #ifdef HAVE_STRPBRK extern char *strpbrk(const char *, const char *); #endif --- 50,56 *** ../vim-8.0.0108/src/search.c2016-10-15 17:06:42.090912729 +0200 --- src/search.c2016-12-01 17:10:38.673588854 +0100 *** *** 1695,1701 } else { ! if (vim_memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 && stop) break; } stop = TRUE; --- 1695,1702 } else { ! if (memcmp(p + col, lastc_bytes, lastc_bytelen) == 0 ! && stop) break; } stop = TRUE; *** ../vim-8.0.0108/src/tag.c 2016-10-15 17:06:42.090912729 +0200 --- src/tag.c 2016-12-01 17:08:35.742390142 +0100 *** *** 2400,2406 mfp2 = ((struct match_found **) (ga_match[mtt].ga_data))[i]; if (mfp2->len == mfp->len ! && vim_memcmp(mfp2->match, mfp->match, (size_t)mfp->len) == 0) break; fast_breakcheck(); --- 2400,2406 mfp2 = ((struct match_found **)
Re: Patch 8.0.0105
Skywind wrote: > Bram Moolenaar wrote: > > > You can improve this a lot by changing: > > > >if ch_canread(ch) > > let text = ch_read(ch, {'timeout':0}) > > caddexpr text > > cbottom > > endif > > > > To: > > > >if ch_canread(ch) > > while ch_canread(ch) > > let text = ch_read(ch, {'timeout':0}) > > caddexpr text > > endwhile > > cbottom > > endif > > Yes, I intentionally do so to make reading really slower than writing. > > > But, you might still miss some messages if the job exits early. > > > > I suppose we will need to add an option to tell Vim that you will read > > the messages, not using a callback. I think this should do it: > > > > "drop" Specifies when to drop messages: > > "auto" When there is no callback to handle a message. > > The "close_cb" is also considered for this. > > "never" All messages will be kept. > > > > It's very nice if I can have the "drop" option in job_start ! Should work with patch 8.0.0107. Took a bit of debugging to figure out why the channel was reported as being closed. I thought messages were being dropped somewhere, but it turned out to be a problem with ch_canread(). -- hundred-and-one symptoms of being an internet addict: 65. The last time you looked at the clock it was 11:30pm, and in what seems like only a few seconds later, your sister runs past you to catch her 7am school bus. /// 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.0.0108
Patch 8.0.0108 (after 8.0.0107) Problem:The channel "drop" option is not tested. Solution: Add a test. Files: src/testdir/test_channel.vim *** ../vim-8.0.0107/src/testdir/test_channel.vim2016-11-29 21:54:41.116260206 +0100 --- src/testdir/test_channel.vim2016-12-01 16:38:49.326026563 +0100 *** *** 129,134 --- 129,137 call ch_setoptions(handle, {'mode': 'json'}) call assert_fails("call ch_setoptions(handle, {'waittime': 111})", "E475") call ch_setoptions(handle, {'callback': ''}) + call ch_setoptions(handle, {'drop': 'never'}) + call ch_setoptions(handle, {'drop': 'auto'}) + call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", "E475") " Send an eval request that works. call assert_equal('ok', ch_evalexpr(handle, 'eval-works')) *** *** 249,254 --- 252,258 " func Ch_handler(chan, msg) + call ch_log('Ch_handler()') unlet g:Ch_reply let g:Ch_reply = a:msg endfunc *** *** 272,277 --- 276,282 endfunc func Test_channel_handler() + call ch_logfile('channellog', 'w') call ch_log('Test_channel_handler()') let g:Ch_reply = "" let s:chopt.callback = 'Ch_handler' *** *** 437,443 " Add a dummy close callback to avoid that messages are dropped when calling " ch_canread(). let job = job_start(s:python . " test_channel_pipe.py", ! \ {'mode': 'raw', 'close_cb': {chan -> 0}}) call assert_equal(v:t_job, type(job)) call assert_equal("run", job_status(job)) --- 442,448 " Add a dummy close callback to avoid that messages are dropped when calling " ch_canread(). let job = job_start(s:python . " test_channel_pipe.py", ! \ {'mode': 'raw', 'drop': 'never'}) call assert_equal(v:t_job, type(job)) call assert_equal("run", job_status(job)) *** ../vim-8.0.0107/src/version.c 2016-12-01 15:34:04.087413921 +0100 --- src/version.c 2016-12-01 16:31:56.204722973 +0100 *** *** 766,767 --- 766,769 { /* Add new patch number below this line */ + /**/ + 108, /**/ -- hundred-and-one symptoms of being an internet addict: 63. You start using smileys in your snail 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.
Patch 8.0.0107
Patch 8.0.0107 Problem:When reading channel output in a timer, messages may go missing. (Skywind) Solution: Add the "drop" option. Write error messages in the channel log. Don't have ch_canread() check for the channel being open. Files: src/structs.h, src/channel.c, src/message.c, src/evalfunc.c, src/proto/channel.pro, runtime/doc/channel.txt *** ../vim-8.0.0106/src/structs.h 2016-11-24 15:09:03.405856662 +0100 --- src/structs.h 2016-12-01 13:04:30.094157140 +0100 *** *** 1474,1479 --- 1474,1480 typval_T *jq_value; jsonq_T *jq_next; jsonq_T *jq_prev; + int jq_no_callback; /* TRUE when no callback was found */ }; struct cbq_S *** *** 1597,1602 --- 1598,1604 partial_T *ch_partial; char_u*ch_close_cb; /* call when channel is closed */ partial_T *ch_close_partial; + int ch_drop_never; job_T *ch_job;/* Job that uses this channel; this does not * count as a reference to avoid a circular *** *** 1684,1689 --- 1686,1692 partial_T *jo_close_partial; /* not referenced! */ char_u*jo_exit_cb;/* not allocated! */ partial_T *jo_exit_partial; /* not referenced! */ + int jo_drop_never; int jo_waittime; int jo_timeout; int jo_out_timeout; *** ../vim-8.0.0106/src/channel.c 2016-11-29 21:54:41.116260206 +0100 --- src/channel.c 2016-12-01 15:21:38.504292378 +0100 *** *** 1195,1200 --- 1195,1201 if (opt->jo_set & JO_CLOSE_CALLBACK) set_callback(&channel->ch_close_cb, &channel->ch_close_partial, opt->jo_close_cb, opt->jo_close_partial); + channel->ch_drop_never = opt->jo_drop_never; if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER) { *** *** 1918,1923 --- 1919,1925 clear_tv(&listtv); else { + item->jq_no_callback = FALSE; item->jq_value = alloc_tv(); if (item->jq_value == NULL) { *** *** 2050,2060 * When "id" is positive it must match the first number in the list. * When "id" is zero or negative jut get the first message. But not the one * with id ch_block_id. * Return OK when found and return the value in "rettv". * Return FAIL otherwise. */ static int ! channel_get_json(channel_T *channel, ch_part_T part, int id, typval_T **rettv) { jsonq_T *head = &channel->ch_part[part].ch_json_head; jsonq_T *item = head->jq_next; --- 2052,2068 * When "id" is positive it must match the first number in the list. * When "id" is zero or negative jut get the first message. But not the one * with id ch_block_id. + * When "without_callback" is TRUE also get messages that were pushed back. * Return OK when found and return the value in "rettv". * Return FAIL otherwise. */ static int ! channel_get_json( ! channel_T *channel, ! ch_part_T part, ! int id, ! int without_callback, ! typval_T**rettv) { jsonq_T *head = &channel->ch_part[part].ch_json_head; jsonq_T *item = head->jq_next; *** *** 2064,2073 list_T *l = item->jq_value->vval.v_list; typval_T*tv = &l->lv_first->li_tv; ! if ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id) || (id <= 0 && (tv->v_type != VAR_NUMBER || tv->vval.v_number == 0 !|| tv->vval.v_number != channel->ch_part[part].ch_block_id))) { *rettv = item->jq_value; if (tv->v_type == VAR_NUMBER) --- 2072,2082 list_T *l = item->jq_value->vval.v_list; typval_T*tv = &l->lv_first->li_tv; ! if ((without_callback || !item->jq_no_callback) ! && ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id) || (id <= 0 && (tv->v_type != VAR_NUMBER || tv->vval.v_number == 0 !|| tv->vval.v_number != channel->ch_part[part].ch_block_id { *rettv = item->jq_value; if (tv->v_type == VAR_NUMBER) *** *** 2080,2085 --- 2089,2153 return FAIL; } + /* + * Put back "rettv" into the JSON queue, there was no callback for it. + * Takes over the values in "rettv". + */ + static void + channel_push_json(channel_T *channel, ch_part_T part, typval_T *rettv) + { + jsonq_T *head = &channel->ch_part[part].ch_json_head; + jsonq_T *item = head->jq_next; + jsonq_T *newitem; + + if (head->jq_prev != NULL && head->jq_prev->jq_no_callback) + /* last item was pushed back, append t
Re: [vim/vim] Feature request: Please provide an AppImage for gVim (#1204)
Op 1 dec. 2016 15:28 schreef "Brenton Horne" : > > Yep, I know that's why I deleted that comment. Oh, I reacted via the mailing list, I didn't know that! Sorry... Christ van Willegen -- -- 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] Feature request: Please provide an AppImage for gVim (#1204)
Op 1 dec. 2016 14:54 schreef "Brenton Horne" : > > Why vim-win32-installer? _Like_ vim-win32-installer... Christ van Willegen -- -- 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: Patch 8.0.0105
Bram Moolenaar wrote: > You can improve this a lot by changing: > >if ch_canread(ch) > let text = ch_read(ch, {'timeout':0}) > caddexpr text > cbottom > endif > > To: > >if ch_canread(ch) > while ch_canread(ch) > let text = ch_read(ch, {'timeout':0}) > caddexpr text > endwhile > cbottom > endif Yes, I intentionally do so to make reading really slower than writing. > But, you might still miss some messages if the job exits early. > > I suppose we will need to add an option to tell Vim that you will read > the messages, not using a callback. I think this should do it: > > "drop"Specifies when to drop messages: > "auto" When there is no callback to handle a message. > The "close_cb" is also considered for this. > "never" All messages will be kept. > It's very nice if I can have the "drop" option in job_start ! -- -- 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: Patch 8.0.0105
Skywind wrote: > Bram Moolenaar wrote: > > When writing the test I also had problems with messages being dropped. > > I thought that adding a close callback should fix it, but perhaps there > > is another situation where they are still dropped. > > > > Can you enable the channel log and see where the messages are dropped? > > > > I reduced loop times in timerjob.py from 8 to 100 times > > The full file is still too long, I have uploaded it on gist: > https://gist.github.com/skywind3000/3a2f6016240e33e97587e1181563b163 > > Here is an abbreviated version: Thanks. I had a try myself to get the full log. Apparently the close callback is called quite soon, and since you only read a line every 10 msec you miss all the ones after a second. You can improve this a lot by changing: if ch_canread(ch) let text = ch_read(ch, {'timeout':0}) caddexpr text cbottom endif To: if ch_canread(ch) while ch_canread(ch) let text = ch_read(ch, {'timeout':0}) caddexpr text endwhile cbottom endif But, you might still miss some messages if the job exits early. I suppose we will need to add an option to tell Vim that you will read the messages, not using a callback. I think this should do it: "drop" Specifies when to drop messages: "auto" When there is no callback to handle a message. The "close_cb" is also considered for this. "never" All messages will be kept. -- hundred-and-one symptoms of being an internet addict: 60. As your car crashes through the guardrail on a mountain road, your first instinct is to search for the "back" button. /// 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.