Patch 8.1.0770
Patch 8.1.0770 Problem:Inconsistent use of ELAPSED_FUNC. Solution: Consistently use ELAPSED_FUNC. Also turn ELAPSED_TYPE into a typedef. (Ozaki Kiichi, closes #3815) Files: src/channel.c, src/gui.c, src/misc1.c, src/os_unix.c, src/vim.h *** ../vim-8.1.0769/src/channel.c 2019-01-17 14:31:10.190919265 +0100 --- src/channel.c 2019-01-17 22:20:19.225226754 +0100 *** *** 4290,4296 int r; ch_part_T part = PART_SOCK; #ifdef ELAPSED_FUNC ! ELAPSED_TYPE start_tv; ELAPSED_INIT(start_tv); #endif --- 4290,4296 int r; ch_part_T part = PART_SOCK; #ifdef ELAPSED_FUNC ! elapsed_T start_tv; ELAPSED_INIT(start_tv); #endif *** ../vim-8.1.0769/src/gui.c 2019-01-17 15:43:21.761878368 +0100 --- src/gui.c 2019-01-17 22:20:19.225226754 +0100 *** *** 2951,2959 int gui_wait_for_chars(long wtime, int tb_change_cnt) { ! int retval; #if defined(ELAPSED_FUNC) ! ELAPSED_TYPE start_tv; #endif #ifdef FEAT_MENU --- 2951,2959 int gui_wait_for_chars(long wtime, int tb_change_cnt) { ! int retval; #if defined(ELAPSED_FUNC) ! elapsed_T start_tv; #endif #ifdef FEAT_MENU *** *** 3002,3008 if (gui_wait_for_chars_or_timer(p_ut) == OK) retval = OK; else if (trigger_cursorhold() ! #ifdef ELAPSED_FUNC && ELAPSED_FUNC(start_tv) >= p_ut #endif && typebuf.tb_change_cnt == tb_change_cnt) --- 3002,3008 if (gui_wait_for_chars_or_timer(p_ut) == OK) retval = OK; else if (trigger_cursorhold() ! #if defined(ELAPSED_FUNC) && ELAPSED_FUNC(start_tv) >= p_ut #endif && typebuf.tb_change_cnt == tb_change_cnt) *** ../vim-8.1.0769/src/misc1.c 2019-01-13 23:38:33.399773248 +0100 --- src/misc1.c 2019-01-17 22:20:19.229226723 +0100 *** *** 3891,3897 { #ifdef ELAPSED_FUNC static int did_init = FALSE; ! static ELAPSED_TYPE start_tv; /* Only beep once per half a second, otherwise a sequence of beeps * would freeze Vim. */ --- 3891,3897 { #ifdef ELAPSED_FUNC static int did_init = FALSE; ! static elapsed_Tstart_tv; /* Only beep once per half a second, otherwise a sequence of beeps * would freeze Vim. */ *** ../vim-8.1.0769/src/os_unix.c 2019-01-13 23:38:33.407773189 +0100 --- src/os_unix.c 2019-01-17 22:20:19.229226723 +0100 *** *** 374,380 long wait_time; long elapsed_time = 0; #ifdef ELAPSED_FUNC ! ELAPSED_TYPE start_tv; ELAPSED_INIT(start_tv); #endif --- 374,380 long wait_time; long elapsed_time = 0; #ifdef ELAPSED_FUNC ! elapsed_T start_tv; ELAPSED_INIT(start_tv); #endif *** *** 480,486 } /* no character available */ ! #if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) /* estimate the elapsed time */ elapsed_time += wait_time; #endif --- 480,486 } /* no character available */ ! #ifndef ELAPSED_FUNC /* estimate the elapsed time */ elapsed_time += wait_time; #endif *** *** 1907,1917 #ifdef SET_SIG_ALARM RETSIGTYPE (*sig_save)(); #endif ! #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) ! struct timeval start_tv; if (p_verbose > 0) ! gettimeofday(&start_tv, NULL); #endif #ifdef SET_SIG_ALARM --- 1907,1917 #ifdef SET_SIG_ALARM RETSIGTYPE (*sig_save)(); #endif ! #ifdef ELAPSED_FUNC ! elapsed_T start_tv; if (p_verbose > 0) ! ELAPSED_INIT(start_tv); #endif #ifdef SET_SIG_ALARM *** *** 4831,4838 int fromshell_fd; garray_Tga; int noread_cnt; ! # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) ! struct timeval start_tv; # endif # ifdef FEAT_GUI --- 4831,4838 int fromshell_fd; garray_Tga; int noread_cnt; ! # ifdef ELAPSED_FUNC ! elapsed_T start_tv; # endif # ifdef FEAT_GUI *** *** 6073,6080 # ifdef ELAPSED_FUNC /* Remember at what time we started, so that we know how much longer we * should wait after being interrupted. */ ! long start_msec = msec; ! ELAPSED_TYPE start_tv; if (msec > 0) ELAPSED_INIT(start_tv); --- 6073,6080 # ifdef ELAPSED_FUNC /* Remember at what time we started, so that we know how much longer we * should wait after being interrupted. */ ! long start_msec = msec; ! elapsed_T start_tv; if (ms
Re: Help patch: documentation for patch 8.1.0765
Tony wrote: > I propose the attached patch to runtime/doc/eval.txt to document the > dots in blob literals and in the output of string(blob) Thanks. -- Married is a three ring circus: First comes the engagement ring. Then comes the wedding ring. Then comes the suffering. /// 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.0769
Patch 8.1.0769 Problem::stop is covered in two tests. Solution: Remove Test_stop_in_terminal(). Make other test exit Vim cleanly. (Ozaki Kiichi, closes #3814) Files: src/testdir/test_terminal.vim, src/testdir/test_suspend.vim *** ../vim-8.1.0768/src/testdir/test_terminal.vim 2019-01-09 23:00:58.001176090 +0100 --- src/testdir/test_terminal.vim 2019-01-17 22:11:01.022070824 +0100 *** *** 1690,1728 call delete('Xfile') endfunc - func Test_stop_in_terminal() - " We can't expect this to work on all systems, just test on Linux for now. - if !has('unix') || system('uname') !~ 'Linux' - return - endif - term /bin/sh - let bufnr = bufnr('') - call WaitForAssert({-> assert_equal('running', term_getstatus(bufnr))}) - let lastrow = term_getsize(bufnr)[0] - - call term_sendkeys(bufnr, GetVimCommandClean() . "\r") - call term_sendkeys(bufnr, ":echo 'ready'\r") - call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))}) - - call term_sendkeys(bufnr, ":stop\r") - " Not sure where "Stopped" shows up, need five lines for Arch. - call WaitForAssert({-> assert_match('Stopped', - \ Get_terminal_text(bufnr, 1) . - \ Get_terminal_text(bufnr, 2) . - \ Get_terminal_text(bufnr, 3) . - \ Get_terminal_text(bufnr, 4) . - \ Get_terminal_text(bufnr, 5))}) - - call term_sendkeys(bufnr, "fg\r") - call term_sendkeys(bufnr, ":echo 'back again'\r") - call WaitForAssert({-> assert_match('back again', Get_terminal_text(bufnr, lastrow))}) - - call term_sendkeys(bufnr, ":quit\r") - call term_wait(bufnr) - call Stop_shell_in_terminal(bufnr) - exe bufnr . 'bwipe' - endfunc - func Test_terminal_no_job() let term = term_start('false', {'term_finish': 'close'}) call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) }) --- 1690,1695 *** ../vim-8.1.0768/src/testdir/test_suspend.vim2018-11-03 21:09:11.703978920 +0100 --- src/testdir/test_suspend.vim2019-01-17 22:12:42.549139836 +0100 *** *** 45,51 call term_sendkeys(buf, "fg\") call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))}) exe buf . 'bwipe!' call delete('Xfoo') - set autowrite& endfunc --- 45,55 call term_sendkeys(buf, "fg\") call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))}) + " Quit gracefully to dump coverage information. + call term_sendkeys(buf, ":qall!\") + call term_wait(buf) + call Stop_shell_in_terminal(buf) + exe buf . 'bwipe!' call delete('Xfoo') endfunc *** ../vim-8.1.0768/src/version.c 2019-01-17 21:09:02.049706334 +0100 --- src/version.c 2019-01-17 22:13:42.644601977 +0100 *** *** 793,794 --- 793,796 { /* Add new patch number below this line */ + /**/ + 769, /**/ -- Marriage isn't a word. It's a sentence. /// 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.0768
Patch 8.1.0768 Problem:Updating completions may cause the popup menu to flicker. Solution: Avoid updating the text below the popup menu before drawing the popup menu. Files: src/popupmnu.c, src/proto/popupmnu.pro, src/edit.c, src/screen.c *** ../vim-8.1.0767/src/popupmnu.c 2019-01-13 23:38:33.407773189 +0100 --- src/popupmnu.c 2019-01-17 21:08:17.890120079 +0100 *** *** 19,24 --- 19,26 static int pum_selected; /* index of selected item or -1 */ static int pum_first = 0; /* index of top item */ + static int call_update_screen = FALSE; + static int pum_height;/* nr of displayed pum items */ static int pum_width; /* width of displayed pum items */ static int pum_base_width;/* width of pum items base */ *** *** 36,42 static int pum_win_wcol; static int pum_win_width; ! static int pum_do_redraw = FALSE; /* do redraw anyway */ static int pum_set_selected(int n, int repeat); --- 38,45 static int pum_win_wcol; static int pum_win_width; ! static int pum_do_redraw = FALSE; // do redraw anyway ! static int pum_skip_redraw = FALSE; // skip redraw static int pum_set_selected(int n, int repeat); *** *** 354,359 --- 357,392 } /* + * Set a flag that when pum_redraw() is called it first calls update_screen(). + * This will avoid clearing and redrawing the popup menu, prevent flicker. + */ + void + pum_call_update_screen() + { + call_update_screen = TRUE; + + // Update the cursor position to be able to compute the popup menu + // position. The cursor line length may have changed because of the + // inserted completion. + curwin->w_valid &= VALID_CROW|VALID_CHEIGHT; + validate_cursor(); + } + + /* + * Return TRUE if we are going to redraw the popup menu and the screen position + * "row"/"col" is under the popup menu. + */ + int + pum_under_menu(int row, int col) + { + return pum_skip_redraw + && row >= pum_row + && row < pum_row + pum_height + && col >= pum_col - 1 + && col < pum_col + pum_width; + } + + /* * Redraw the popup menu, using "pum_first" and "pum_selected". */ void *** *** 376,382 int round; int n; ! /* Never display more than we have */ if (pum_first > pum_size - pum_height) pum_first = pum_size - pum_height; --- 409,423 int round; int n; ! if (call_update_screen) ! { ! call_update_screen = FALSE; ! pum_skip_redraw = TRUE; // do not redraw in pum_may_redraw(). ! update_screen(0); ! pum_skip_redraw = FALSE; ! } ! ! // never display more than we have if (pum_first > pum_size - pum_height) pum_first = pum_size - pum_height; *** *** 789,794 --- 830,836 pum_do_redraw = TRUE; update_screen(0); pum_do_redraw = FALSE; + call_update_screen = FALSE; } } } *** *** 844,850 int len = pum_size; int selected = pum_selected; ! if (!pum_visible()) return; // nothing to do if (pum_window != curwin --- 886,892 int len = pum_size; int selected = pum_selected; ! if (!pum_visible() || pum_skip_redraw) return; // nothing to do if (pum_window != curwin *** ../vim-8.1.0767/src/proto/popupmnu.pro 2018-06-17 14:47:50.649309059 +0200 --- src/proto/popupmnu.pro 2019-01-17 20:18:33.927980786 +0100 *** *** 1,5 --- 1,7 /* popupmnu.c */ void pum_display(pumitem_T *array, int size, int selected); + void pum_call_update_screen(void); + int pum_under_menu(int row, int col); void pum_redraw(void); void pum_undisplay(void); void pum_clear(void); *** ../vim-8.1.0767/src/edit.c 2019-01-13 23:38:33.379773390 +0100 --- src/edit.c 2019-01-17 20:07:30.868052215 +0100 *** *** 3020,3026 if (compl_match_array != NULL) { h = curwin->w_cline_height; ! update_screen(0); if (h != curwin->w_cline_height) ins_compl_del_pum(); } --- 3020,3027 if (compl_match_array != NULL) { h = curwin->w_cline_height; ! // Update the screen later, before drawing the popup menu over it. ! pum_call_update_screen(); if (h != curwin->w_cline_height) ins_compl_del_pum(); } *** *** 3110,3117 do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif"); #endif ! /* Update the screen before drawing the popup menu over it. */ ! update
Help patch: documentation for patch 8.1.0765
I propose the attached patch to runtime/doc/eval.txt to document the dots in blob literals and in the output of string(blob) Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. # HG changeset patch # Parent 80bd6cd8311752463b717210ebfebefc4284e08d Document patch 8.1.0765 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1286,16 +1286,19 @@ Note that "\000" and "\x00" force the en blob-literal*blob-literal* *E973* Hexadecimal starting with 0z or 0Z, with an arbitrary number of bytes. The sequence must be an even number of hex characters. Example: > :let b = 0zFF00ED015DAF +Dots can be added for legibility, but only between bytes: > + :let b = 0zFF00.ED01.5DAF " same as above + :let b = 0zF.F00ED015DA.F " ILLEGAL ! literal-string *literal-string* *E115* --- 'string' string constant *expr-'* Note that single quotes are used. @@ -3800,19 +3803,19 @@ escape({string}, {chars})*escape()* :echo escape('c:\program files\vim', ' \') < results in: > c:\\program\ files\\vim < Also see |shellescape()| and |fnameescape()|. *eval()* eval({string}) Evaluate {string} and return the result. Especially useful to turn the result of |string()| back into the original value. - This works for Numbers, Floats, Strings and composites of - them. Also works for |Funcref|s that refer to existing - functions. + This works for Numbers, Floats, Strings, Blobs and composites + of them. Also works for |Funcref|s that refer to existing + functions and for non-recursive Lists and Dictionaries. eventhandler() *eventhandler()* Returns 1 when inside an event handler. That is that Vim got interrupted while waiting for the user to type a character, e.g., when dropping a file on Vim. This means interactive commands cannot be used. Otherwise zero is returned. executable({expr}) *executable()* @@ -8612,25 +8615,26 @@ stridx({haystack}, {needle} [, {start}]) :echo stridx("Starting point", "Start")0 :echo stridx("Starting point", "start") -1 < *strstr()* *strchr()* stridx() works similar to the C function strstr(). When used with a single character it works similar to strchr(). *string()* string({expr}) Return {expr} converted to a String. If {expr} is a Number, - Float, String or a composition of them, then the result can be - parsed back with |eval()|. + Float, String, Blob or a composition of them, then the result + can be parsed back with |eval()|. {expr} type result ~ String 'string' (single quotes are doubled) Number 123 Float 123.123456 or 1.123456e8 Funcref function('name') List [item, item] Dictionary {key: value, key: value} + Blob 0z01234567.89ABCDEF When a List or Dictionary has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result will then fail. Also see |strtrans()|. *strlen()*
Patch 8.1.0767
Patch 8.1.0767 Problem:When deleting lines at the bottom signs are misplaced. Solution: Properly update the line number of signs at the end of a buffer after a delete/undo operation. (Yegappan Lakshmanan, closes #3798) Files: src/sign.c, src/testdir/test_signs.vim *** ../vim-8.1.0766/src/sign.c 2019-01-15 20:19:36.747904404 +0100 --- src/sign.c 2019-01-17 17:34:20.468494506 +0100 *** *** 660,677 long amount_after) { signlist_T*sign; // a sign in a b_signlist FOR_ALL_SIGNS_IN_BUF(curbuf, sign) { if (sign->lnum >= line1 && sign->lnum <= line2) { ! if (amount == MAXLNUM) ! sign->lnum = line1; ! else ! sign->lnum += amount; } else if (sign->lnum > line2) ! sign->lnum += amount_after; } } --- 660,687 long amount_after) { signlist_T*sign; // a sign in a b_signlist + linenr_T new_lnum; FOR_ALL_SIGNS_IN_BUF(curbuf, sign) { + // Ignore changes to lines after the sign + if (sign->lnum < line1) + continue; + new_lnum = sign->lnum; if (sign->lnum >= line1 && sign->lnum <= line2) { ! if (amount != MAXLNUM) ! new_lnum += amount; } else if (sign->lnum > line2) ! // Lines inserted or deleted before the sign ! new_lnum += amount_after; ! ! // If the new sign line number is past the last line in the buffer, ! // then don't adjust the line number. Otherwise, it will always be past ! // the last line and will not be visible. ! if (new_lnum <= curbuf->b_ml.ml_line_count) ! sign->lnum = new_lnum; } } *** ../vim-8.1.0766/src/testdir/test_signs.vim 2019-01-11 13:42:31.680331155 +0100 --- src/testdir/test_signs.vim 2019-01-17 17:34:20.472494477 +0100 *** *** 1202,1214 enew! | only! sign define sign1 text=#> linehl=Comment ! call setline(1, ['A', 'B', 'C', 'D']) exe 'sign place 5 line=3 name=sign1 buffer=' . bufnr('') let l = sign_getplaced(bufnr('')) call assert_equal(3, l[0].signs[0].lnum) " Add some lines before the sign and check the sign line number ! call append(2, ['AA', 'AB', 'AC']) let l = sign_getplaced(bufnr('')) call assert_equal(6, l[0].signs[0].lnum) --- 1202,1214 enew! | only! sign define sign1 text=#> linehl=Comment ! call setline(1, ['A', 'B', 'C', 'D', 'E']) exe 'sign place 5 line=3 name=sign1 buffer=' . bufnr('') let l = sign_getplaced(bufnr('')) call assert_equal(3, l[0].signs[0].lnum) " Add some lines before the sign and check the sign line number ! call append(2, ['BA', 'BB', 'BC']) let l = sign_getplaced(bufnr('')) call assert_equal(6, l[0].signs[0].lnum) *** *** 1217,1222 --- 1217,1260 let l = sign_getplaced(bufnr('')) call assert_equal(4, l[0].signs[0].lnum) + " Insert some lines after the sign and check the sign line number + call append(5, ['DA', 'DB']) + let l = sign_getplaced(bufnr('')) + call assert_equal(4, l[0].signs[0].lnum) + + " Delete some lines after the sign and check the sign line number + call deletebufline('', 6, 7) + let l = sign_getplaced(bufnr('')) + call assert_equal(4, l[0].signs[0].lnum) + + " Break the undo. Otherwise the undo operation below will undo all the + " changes made by this function. + let &undolevels=&undolevels + + " Delete the line with the sign + call deletebufline('', 4) + let l = sign_getplaced(bufnr('')) + call assert_equal(4, l[0].signs[0].lnum) + + " Undo the delete operation + undo + let l = sign_getplaced(bufnr('')) + call assert_equal(5, l[0].signs[0].lnum) + + " Break the undo + let &undolevels=&undolevels + + " Delete few lines at the end of the buffer including the line with the sign + " Sign line number should not change (as it is placed outside of the buffer) + call deletebufline('', 3, 6) + let l = sign_getplaced(bufnr('')) + call assert_equal(5, l[0].signs[0].lnum) + + " Undo the delete operation. Sign should be restored to the previous line + undo + let l = sign_getplaced(bufnr('')) + call assert_equal(5, l[0].signs[0].lnum) + sign unplace * group=* sign undefine sign1 enew! *** ../vim-8.1.0766/src/version.c 2019-01-17 17:13:25.924984061 +0100 --- src/version.c 2019-01-17 17:32:46.589140279 +0100 *** *** 793,794 --- 793,796 { /* Add new patch number below this line */ + /**/ + 767, /**/ -- hundred-and-one symptoms of being an internet addict: 240. You think Webster's Dictionary is a directory of WEB sites. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new progra
Patch 8.1.0766
Patch 8.1.0766 Problem:Various problems when using Vim on VMS. Solution: Various fixes. Define long_long_T. (Zoltan Arpadffy) Files: src/eval.c, src/feature.h, src/fileio.c, src/gui_motif.c, src/gui_x11.c, src/gui_xmebw.c, src/json.c, src/Make_vms.mms, src/ops.c, src/os_vms_conf.h, src/vim.h, src/xdiff/xdiff.h, src/xdiff/xinclude.h *** ../vim-8.1.0765/src/eval.c 2019-01-17 16:32:49.469289080 +0100 --- src/eval.c 2019-01-17 16:58:23.559357386 +0100 *** *** 7414,7420 { case VAR_NUMBER: vim_snprintf((char *)buf, NUMBUFLEN, "%lld", ! (long long)varp->vval.v_number); return buf; case VAR_FUNC: case VAR_PARTIAL: --- 7414,7420 { case VAR_NUMBER: vim_snprintf((char *)buf, NUMBUFLEN, "%lld", ! (long_long_T)varp->vval.v_number); return buf; case VAR_FUNC: case VAR_PARTIAL: *** ../vim-8.1.0765/src/feature.h 2019-01-17 15:43:21.757878392 +0100 --- src/feature.h 2019-01-17 16:58:23.559357386 +0100 *** *** 380,386 /* * +timerstimer_start() */ ! #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(WIN32)) # define FEAT_TIMERS #endif --- 380,386 /* * +timerstimer_start() */ ! #if defined(FEAT_RELTIME) && (defined(UNIX) || defined(WIN32) || defined(VMS) ) # define FEAT_TIMERS #endif *** *** 1306,1312 * +balloon_eval_term Allow balloon expression evaluation in the terminal. */ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \ ! (defined(UNIX) || (defined(WIN32) && !defined(FEAT_GUI_W32))) # define FEAT_BEVAL_TERM #endif --- 1306,1312 * +balloon_eval_term Allow balloon expression evaluation in the terminal. */ #if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \ ! (defined(UNIX) || defined(VMS) || (defined(WIN32) && !defined(FEAT_GUI_W32))) # define FEAT_BEVAL_TERM #endif *** ../vim-8.1.0765/src/fileio.c2019-01-17 15:43:21.761878368 +0100 --- src/fileio.c2019-01-17 16:58:23.563357359 +0100 *** *** 5334,5347 *p++ = ' '; if (shortmess(SHM_LINES)) vim_snprintf((char *)p, IOSIZE - (p - IObuff), ! "%ldL, %lldC", lnum, (long long)nchars); else { sprintf((char *)p, NGETTEXT("%ld line, ", "%ld lines, ", lnum), lnum); p += STRLEN(p); vim_snprintf((char *)p, IOSIZE - (p - IObuff), NGETTEXT("%lld character", "%lld characters", nchars), ! (long long)nchars); } } --- 5334,5347 *p++ = ' '; if (shortmess(SHM_LINES)) vim_snprintf((char *)p, IOSIZE - (p - IObuff), ! "%ldL, %lldC", lnum, (long_long_T)nchars); else { sprintf((char *)p, NGETTEXT("%ld line, ", "%ld lines, ", lnum), lnum); p += STRLEN(p); vim_snprintf((char *)p, IOSIZE - (p - IObuff), NGETTEXT("%lld character", "%lld characters", nchars), ! (long_long_T)nchars); } } *** ../vim-8.1.0765/src/gui_motif.c 2019-01-17 15:43:21.761878368 +0100 --- src/gui_motif.c 2019-01-17 16:58:23.563357359 +0100 *** *** 34,42 #include #include #include - #ifdef HAVE_X11_XPM_H ! # include #else # ifdef HAVE_XM_XPMP_H # include --- 34,45 #include #include #include #ifdef HAVE_X11_XPM_H ! # if defined(VMS) ! # include ! # else ! # include ! # endif #else # ifdef HAVE_XM_XPMP_H # include *** ../vim-8.1.0765/src/gui_x11.c 2019-01-17 15:43:21.761878368 +0100 --- src/gui_x11.c 2019-01-17 16:58:23.563357359 +0100 *** *** 30,36 # include #else # ifdef HAVE_X11_XPM_H ! # include # endif #endif --- 30,40 # include #else # ifdef HAVE_X11_XPM_H ! # ifdef VMS ! # include ! # else ! # include ! # endif # endif #endif *** ../vim-8.1.0765/src/gui_xmebw.c 2018-11-16 16:21:01.641310033 +0100 --- src/gui_xmebw.c 2019-01-17 16:58:23.563357359 +0100 *** *** 35,41 # include # define UNHIGHLIGHTT #else ! # include #endif #include #include --- 35,47 # include # define UNHIGHLIGHTT #else ! # ifdef HAVE_X11_XPM_H ! # ifdef VMS ! # include ! # else ! # include ! # endif ! # endif #endif #include #include *** ../vim-8.1.0765/src/json.c 2019-01-13 23:38:33.399773248 +0100 --- src/json.c 2019-01-17 16:58:23.563357359 +0100 *** *** 218,224 case VAR_NUMBER: vim_snprintf((char *)numbuf, NUMBUFLEN, "%lld", ! (long long)val->vval.v_number); ga_concat(gap, numbuf); break; --- 218,224 case VAR_NUMBER: vim_snpr
Patch 8.1.0765
Patch 8.1.0765 Problem:String format of a Blob can't be parsed back. Solution: Use 0z format. Files: src/blob.c, src/eval.c, src/testdir/test_blob.vim *** ../vim-8.1.0764/src/blob.c 2019-01-13 23:38:33.375773418 +0100 --- src/blob.c 2019-01-17 16:25:08.460040233 +0100 *** *** 168,174 } /* ! * Convert a blob to a readable form: "[0x11,0x34]" */ char_u * blob2string(blob_T *blob, char_u **tofree, char_u *numbuf) --- 168,174 } /* ! * Convert a blob to a readable form: "0z00112233.44556677.8899" */ char_u * blob2string(blob_T *blob, char_u **tofree, char_u *numbuf) *** *** 179,198 if (blob == NULL) { *tofree = NULL; ! return (char_u *)"[]"; } // Store bytes in the growarray. ga_init2(&ga, 1, 4000); ! ga_append(&ga, '['); for (i = 0; i < blob_len(blob); i++) { ! if (i > 0) ! ga_concat(&ga, (char_u *)","); ! vim_snprintf((char *)numbuf, NUMBUFLEN, "0x%02X", (int)blob_get(blob, i)); ga_concat(&ga, numbuf); } - ga_append(&ga, ']'); *tofree = ga.ga_data; return *tofree; } --- 179,197 if (blob == NULL) { *tofree = NULL; ! return (char_u *)"0z"; } // Store bytes in the growarray. ga_init2(&ga, 1, 4000); ! ga_concat(&ga, (char_u *)"0z"); for (i = 0; i < blob_len(blob); i++) { ! if (i > 0 && (i & 3) == 0) ! ga_concat(&ga, (char_u *)"."); ! vim_snprintf((char *)numbuf, NUMBUFLEN, "%02X", (int)blob_get(blob, i)); ga_concat(&ga, numbuf); } *tofree = ga.ga_data; return *tofree; } *** *** 207,230 blob_T *blob = blob_alloc(); char_u *s = str; ! if (*s != '[') goto failed; ! s = skipwhite(s + 1); ! while (*s != ']') { ! if (s[0] != '0' || s[1] != 'x' !|| !vim_isxdigit(s[2]) || !vim_isxdigit(s[3])) ! goto failed; ! ga_append(&blob->bv_ga, (hex2nr(s[2]) << 4) + hex2nr(s[3])); ! s += 4; ! if (*s == ',') ! s = skipwhite(s + 1); ! else if (*s != ']') goto failed; } ! s = skipwhite(s + 1); ! if (*s != NUL) ! goto failed; // text after final ']' ++blob->bv_refcount; return blob; --- 206,225 blob_T *blob = blob_alloc(); char_u *s = str; ! if (s[0] != '0' || (s[1] != 'z' && s[1] != 'Z')) goto failed; ! s += 2; ! while (vim_isxdigit(*s)) { ! if (!vim_isxdigit(s[1])) goto failed; + ga_append(&blob->bv_ga, (hex2nr(s[0]) << 4) + hex2nr(s[1])); + s += 2; + if (*s == '.' && vim_isxdigit(s[1])) + ++s; } ! if (*skipwhite(s) != NUL) ! goto failed; // text after final digit ++blob->bv_refcount; return blob; *** ../vim-8.1.0764/src/eval.c 2019-01-15 22:44:14.459222955 +0100 --- src/eval.c 2019-01-17 16:23:31.744690466 +0100 *** *** 4258,4263 --- 4258,4265 if (blob != NULL) ga_append(&blob->bv_ga, (hex2nr(*bp) << 4) + hex2nr(*(bp+1))); + if (bp[2] == '.' && vim_isxdigit(bp[3])) + ++bp; } if (blob != NULL) rettv_blob_set(rettv, blob); *** ../vim-8.1.0764/src/testdir/test_blob.vim 2019-01-15 22:44:14.459222955 +0100 --- src/testdir/test_blob.vim 2019-01-17 16:31:56.521616741 +0100 *** *** 26,31 --- 26,37 call assert_fails('let b = 0z12345', 'E973:') call assert_equal(0z, test_null_blob()) + + let b = 0z001122.33445566.778899.aabbcc.dd + call assert_equal(0z00112233445566778899aabbccdd, b) + call assert_fails('let b = 0z1.1') + call assert_fails('let b = 0z.') + call assert_fails('let b = 0z001122.') endfunc " assignment to a blob *** *** 91,100 endfunc func Test_blob_to_string() ! let b = 0zDEADBEEF ! call assert_equal('[0xDE,0xAD,0xBE,0xEF]', string(b)) call remove(b, 0, 3) ! call assert_equal('[]', string(b)) endfunc func Test_blob_compare() --- 97,109 endfunc func Test_blob_to_string() ! let b = 0z00112233445566778899aabbccdd ! call assert_equal('0z00112233.44556677.8899AABB.CCDD', string(b)) ! call assert_equal(b, eval(string(b))) ! call remove(b, 4, -1) ! call assert_equal('0z00112233', string(b)) call remove(b, 0, 3) ! call assert_equal('0z', string(b)) endfunc func Test_blob_compare() *** ../vim-8.1.0764/src/version.c 2019-01-17 16:11:02.297811975 +0100 --- src/version.c 2019-01-17 16:12:47.509084110 +0100 *** *** 793,794 --- 793,796 { /* Add new patch number below this line */ + /**/ + 765, /**/ -- hundred-a
Patch 8.1.0764
Patch 8.1.0764 Problem:List of distributed files is outdated. Solution: Remove workshop files. Add blob files. Files: Filelist *** ../vim-8.1.0763/Filelist2019-01-10 21:49:51.982405995 +0100 --- Filelist2019-01-17 16:09:17.134544341 +0100 *** *** 16,21 --- 16,22 src/ascii.h \ src/beval.c \ src/beval.h \ + src/blob.c \ src/blowfish.c \ src/buffer.c \ src/channel.c \ *** *** 146,151 --- 147,153 src/protodef.h \ src/proto/arabic.pro \ src/proto/beval.pro \ + src/proto/blob.pro \ src/proto/blowfish.pro \ src/proto/buffer.pro \ src/proto/channel.pro \ *** *** 334,341 src/gui_x11_pm.h \ src/hangulin.c \ src/if_xcmdsrv.c \ - src/integration.c \ - src/integration.h \ src/link.sh \ src/installman.sh \ src/installml.sh \ --- 336,341 *** *** 358,364 src/proto/if_xcmdsrv.pro \ src/proto/os_unix.pro \ src/proto/pty.pro \ - src/proto/workshop.pro \ src/pty.c \ src/testdir/Makefile \ src/testdir/unix.vim \ --- 358,363 *** *** 368,377 src/vimtutor \ src/gvimtutor \ src/which.sh \ - src/workshop.c \ - src/workshop.h \ - src/wsdebug.c \ - src/wsdebug.h \ src/tee/Makefile \ src/xxd/Makefile \ --- 367,372 *** ../vim-8.1.0763/src/version.c 2019-01-17 15:43:21.765878343 +0100 --- src/version.c 2019-01-17 16:09:40.922378204 +0100 *** *** 793,794 --- 793,796 { /* Add new patch number below this line */ + /**/ + 764, /**/ -- hundred-and-one symptoms of being an internet addict: 236. You start saving URL's in your digital watch. /// 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.0762
Patch 8.1.0762 Problem:Compiler warning. Solution: Add type cast. (Mike Williams) Files: src/channel.c *** ../vim-8.1.0761/src/channel.c 2019-01-13 23:38:33.379773390 +0100 --- src/channel.c 2019-01-17 14:24:07.177737751 +0100 *** *** 4064,4070 else { text = tv_get_string_buf(&argvars[1], buf); ! len = STRLEN(text); } channel = send_common(argvars, text, len, 0, eval, &opt, eval ? "ch_evalraw" : "ch_sendraw", &part_read); --- 4064,4070 else { text = tv_get_string_buf(&argvars[1], buf); ! len = (int)STRLEN(text); } channel = send_common(argvars, text, len, 0, eval, &opt, eval ? "ch_evalraw" : "ch_sendraw", &part_read); *** ../vim-8.1.0761/src/version.c 2019-01-17 14:11:56.438600674 +0100 --- src/version.c 2019-01-17 14:30:04.107359645 +0100 *** *** 797,798 --- 797,800 { /* Add new patch number below this line */ + /**/ + 762, /**/ -- hundred-and-one symptoms of being an internet addict: 235. You start naming your kids Pascal, COBOL, Algol and Fortran. /// 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: Patch 8.1.0757
Yegappan wrote: > On Tue, Jan 15, 2019 at 1:52 PM Bram Moolenaar wrote: > > > > > > Patch 8.1.0757 > > Problem:Not enough documentation for Blobs. > > Solution: Add a section about Blobs. > > Files: runtime/doc/eval.txt > > > > > > *** ../vim-8.1.0756/runtime/doc/eval.txt2019-01-13 > > 15:15:54.388762907 +0100 > > --- runtime/doc/eval.txt2019-01-15 22:48:29.185422882 +0100 > > *** > > ! Part of a blob ~ > > ! > > ! A part of the Blob can be obtained by specifying the first and last index, > > ! separated by a colon in square brackets: > > > ! :let myblob = 0z00112233 > > ! :let shortblob = myblob[2:-1] " get 0z2233 > > ! > > ! Omitting the first index is similar to zero. Omitting the last index is > > ! similar to -1. > > > ! :let endblob = myblob[2:] " from item 2 to the end: 0z2233 > > ! :let shortblob = myblob[2:2]" Blob with one byte: 0z22 > > ! :let otherblob = myblob[:] " make a copy of the Blob > > ! > > > > > ! If the first index is beyond the last byte of the Blob or the second byte > > is > > ! before the first byte, the result is an empty list. There is no error > > > > Is this supposed to say "the second index is before the first index, > the result is > an empty list."? Correct, I'll fix it. I'll send out a runtime update with the fixes soon. -- hundred-and-one symptoms of being an internet addict: 231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner in the front doorway permanently so it always looks like you are actually attempting to do something about that mess that has amassed since you discovered the Internet. /// 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.0761
Patch 8.1.0761 Problem:Default value for brief_wait is wrong. Solution: Make the default FALSE. (Ozaki Kiichi, closes #3812, closes #3799) Files: src/ui.c *** ../vim-8.1.0760/src/ui.c2019-01-13 23:38:33.415773131 +0100 --- src/ui.c2019-01-17 14:09:40.775501667 +0100 *** *** 222,228 longremaining = wtime; int tb_change_cnt = typebuf.tb_change_cnt; # ifdef FEAT_JOB_CHANNEL ! int brief_wait = TRUE; # endif // When waiting very briefly don't trigger timers. --- 222,228 longremaining = wtime; int tb_change_cnt = typebuf.tb_change_cnt; # ifdef FEAT_JOB_CHANNEL ! int brief_wait = FALSE; # endif // When waiting very briefly don't trigger timers. *** ../vim-8.1.0760/src/version.c 2019-01-17 13:04:05.765227482 +0100 --- src/version.c 2019-01-17 14:10:34.159147233 +0100 *** *** 797,798 --- 797,800 { /* Add new patch number below this line */ + /**/ + 761, /**/ -- hundred-and-one symptoms of being an internet addict: 232. You start conversations with, "Have you gotten an ISDN line?" /// 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.0760
Patch 8.1.0760 Problem:No proper test for using 'termencoding'. Solution: Add a screendump test. Fix using double width characters in a screendump. Files: src/terminal.c, src/testdir/test_termencoding.vim, src/testdir/Make_all.mak, src/testdir/dumps/Test_tenc_euc_jp_01.dump *** ../vim-8.1.0759/src/terminal.c 2019-01-13 23:38:33.415773131 +0100 --- src/terminal.c 2019-01-17 12:40:16.242975080 +0100 *** *** 4031,4037 if (cell.width == 2) { fputs("*", fd); - ++pos.col; } else fputs("+", fd); --- 4031,4036 *** *** 4062,4067 --- 4061,4069 prev_cell = cell; } + + if (cell.width == 2) + ++pos.col; } if (repeat > 0) fprintf(fd, "@%d", repeat); *** *** 4103,4108 --- 4105,4111 char_u*prev_char = NULL; int attr = 0; cellattr_Tcell; + cellattr_Tempty_cell; term_T*term = curbuf->b_term; int max_cells = 0; int start_row = term->tl_scrollback.ga_len; *** *** 4110,4115 --- 4113,4119 ga_init2(&ga_text, 1, 90); ga_init2(&ga_cell, sizeof(cellattr_T), 90); vim_memset(&cell, 0, sizeof(cell)); + vim_memset(&empty_cell, 0, sizeof(empty_cell)); cursor_pos->row = -1; cursor_pos->col = -1; *** *** 4208,4273 c = fgetc(fd); } hl2vtermAttr(attr, &cell); - } - else - dump_is_corrupt(&ga_text); ! /* is_bg == 0: fg, is_bg == 1: bg */ ! for (is_bg = 0; is_bg <= 1; ++is_bg) ! { ! if (c == '&') ! { ! /* use same color as previous cell */ ! c = fgetc(fd); ! } ! else if (c == '#') { ! int red, green, blue, index = 0; ! ! c = fgetc(fd); ! red = hex2nr(c); ! c = fgetc(fd); ! red = (red << 4) + hex2nr(c); ! c = fgetc(fd); ! green = hex2nr(c); ! c = fgetc(fd); ! green = (green << 4) + hex2nr(c); ! c = fgetc(fd); ! blue = hex2nr(c); ! c = fgetc(fd); ! blue = (blue << 4) + hex2nr(c); ! c = fgetc(fd); ! if (!isdigit(c)) ! dump_is_corrupt(&ga_text); ! while (isdigit(c)) { ! index = index * 10 + (c - '0'); c = fgetc(fd); } ! ! if (is_bg) { ! cell.bg.red = red; ! cell.bg.green = green; ! cell.bg.blue = blue; ! cell.bg.ansi_index = index; } else ! { ! cell.fg.red = red; ! cell.fg.green = green; ! cell.fg.blue = blue; ! cell.fg.ansi_index = index; ! } } - else - dump_is_corrupt(&ga_text); } } else dump_is_corrupt(&ga_text); append_cell(&ga_cell, &cell); } else if (c == '@') { --- 4212,4279 c = fgetc(fd); } hl2vtermAttr(attr, &cell); ! /* is_bg == 0: fg, is_bg == 1: bg */ ! for (is_bg = 0; is_bg <= 1; ++is_bg) { ! if (c == '&') { ! /* use same color as previous cell */ c = fgetc(fd); } ! else if (c == '#') { ! int red, green, blue, index = 0; ! ! c = fgetc(fd); ! red = hex2nr(c); ! c = fgetc(fd); ! red = (red << 4) + hex2nr(c); ! c = fgetc(fd); ! green = hex2nr(c); ! c = fgetc(fd); ! green = (green << 4) + hex2nr(c); !