Re: Patch 8.1.0757
Hi, 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."? - Yegappan > > ! message. > ! > ! If the second index is equal to or greater than the length of the list the > ! length minus one is used: > > ! :echo myblob[2:8] " result: 0z2233 > ! > ! -- -- 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.07
Patch 8.1.0759 Problem:Showing two characters for tab is limited. Solution: Allow for a third character for "tab:" in 'listchars'. (Nathaniel Braun, Ken Takata, closes #3810) Files: runtime/doc/options.txt, src/globals.h, src/message.c, src/option.c, src/screen.c, src/testdir/test_listchars.vim *** ../vim-8.1.0758/runtime/doc/options.txt 2019-01-08 22:02:36.040297337 +0100 --- runtime/doc/options.txt 2019-01-16 22:32:15.368530721 +0100 *** *** 5025,5035 omitted, there is no extra character at the end of the line. *lcs-tab* ! tab:xyTwo characters to be used to show a tab. The first ! char is used once. The second char is repeated to ! fill the space that the tab normally occupies. ! "tab:>-" will show a tab that takes four spaces as ! ">---". When omitted, a tab is show as ^I. *lcs-space* space:c Character to show for a space. When omitted, spaces are left blank. --- 5066,5091 omitted, there is no extra character at the end of the line. *lcs-tab* ! tab:xy[z] Two or three characters to be used to show a tab. ! The third character is optional. ! ! tab:xyThe 'x' is always used, then 'y' as many times as will ! fit. Thus "tab:>-" displays: ! > ! >- ! >-- ! etc. ! ! tab:xyz The 'z' is always used, then 'x' is prepended, and ! then 'y' is used as many times as will fit. Thus ! "tab:<->" displays: ! > ! <> ! <-> ! <--> ! etc. ! ! When "tab:" is omitted, a tab is shown as ^I. *lcs-space* space:c Character to show for a space. When omitted, spaces are left blank. *** ../vim-8.1.0758/src/globals.h 2019-01-13 23:38:33.391773303 +0100 --- src/globals.h 2019-01-16 22:25:51.783632939 +0100 *** *** 1163,1168 --- 1163,1169 EXTERN intlcs_space INIT(= NUL); EXTERN intlcs_tab1 INIT(= NUL); EXTERN intlcs_tab2 INIT(= NUL); + EXTERN intlcs_tab3 INIT(= NUL); EXTERN intlcs_trail INIT(= NUL); #ifdef FEAT_CONCEAL EXTERN intlcs_conceal INIT(= ' '); *** ../vim-8.1.0758/src/message.c 2019-01-13 23:38:33.399773248 +0100 --- src/message.c 2019-01-16 22:25:51.783632939 +0100 *** *** 1771,1776 --- 1771,1777 int col = 0; int n_extra = 0; int c_extra = 0; + int c_final = 0; char_u*p_extra = NULL;/* init to make SASC shut up */ int n; int attr = 0; *** *** 1801,1807 if (n_extra > 0) { --n_extra; ! if (c_extra) c = c_extra; else c = *p_extra++; --- 1802,1810 if (n_extra > 0) { --n_extra; ! if (n_extra == 0 && c_final) ! c = c_final; ! else if (c_extra) c = c_extra; else c = *p_extra++; *** *** 1844,1854 { c = ' '; c_extra = ' '; } else { ! c = lcs_tab1; c_extra = lcs_tab2; attr = HL_ATTR(HLF_8); } } --- 1847,1859 { c = ' '; c_extra = ' '; + c_final = NUL; } else { ! c = (n_extra == 0 && lcs_tab3) ? lcs_tab3 : lcs_tab1; c_extra = lcs_tab2; + c_final = lcs_tab3; attr = HL_ATTR(HLF_8); } } *** *** 1861,1866 --- 1866,1872 { p_extra = (char_u *)""; c_extra = NUL; + c_final = NUL; n_extra = 1; c = lcs_eol; attr = HL_ATTR(HLF_AT); *** *** 1871,1876 --- 1877,1883 n_extra = n - 1; p_extra = transchar_byte(c);
Patch 8.1.0758
Patch 8.1.0758 Problem:Font number is always one instead of the actual. Solution: Use "%d" instead of "1". (Ken Takata) Files: src/gui_x11.c *** ../vim-8.1.0757/src/gui_x11.c 2019-01-15 20:19:36.747904404 +0100 --- src/gui_x11.c 2019-01-16 22:10:21.175336130 +0100 *** *** 2209,2215 { semsg(_("E253: Fontset name: %s"), base_name); semsg(_("Font0: %s"), font_name[min_font_idx]); ! semsg(_("Font1: %s"), font_name[i]); semsg(_("Font%d width is not twice that of font0"), i); semsg(_("Font0 width: %d"), (int)xfs[min_font_idx]->max_bounds.width); --- 2209,2215 { semsg(_("E253: Fontset name: %s"), base_name); semsg(_("Font0: %s"), font_name[min_font_idx]); ! semsg(_("Font%d: %s"), i, font_name[i]); semsg(_("Font%d width is not twice that of font0"), i); semsg(_("Font0 width: %d"), (int)xfs[min_font_idx]->max_bounds.width); *** ../vim-8.1.0757/src/version.c 2019-01-15 22:51:35.82001 +0100 --- src/version.c 2019-01-16 22:14:07.957473383 +0100 *** *** 797,798 --- 797,800 { /* Add new patch number below this line */ + /**/ + 758, /**/ -- hundred-and-one symptoms of being an internet addict: 226. You sit down at the computer right after dinner and your spouse says "See you in the morning." /// 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
> I see a typo and have some questions: > > > ! To change a sequence of bytes the [:] notation can be used: > > > ! let blob[1:3] = 0z445566 > > ! The length of the replaced bytes much be exactly the same as the value > > Typo: much -> must > > > ! To change part of a blob you can specify the first and last byte to be > > ! modified. The value must at least have the number of bytes in the > range: > > > ! :let blob[3:5] = [3, 4, 5] > > Suddenly it's possible to specify longer sequences? The paragraph above > prohibits this. No, this was indeed a copy-paste leftover. > Or is this paragraph a copy-paste leftover? Except for the length thing it > seems to say almost the same thing as the previous one. > Also the example uses a list as a replacement value, not a blob. Is it > intentional? What if the list contains something other than what fits in > bytes? The value must be a blob, a list doesn't work. > > + < *blob-identity* *E977* > > + When variable "aa" is a Blob and you assign it to another variable > "bb", both > > + variables refer to the same Blob. Then the "is" operator returns true. > > + > > + When making a copy using [:] or |copy()| the values are the same, but > the > > + identity is different: > > > + :let blob = 0z112233 > > + :let blob2 = blob > > + :echo blob == blob2 > > + < 1 > > > + :echo blob is blob2 > > + < 1 > > > + :let blob3 = blob[:] > > + :echo blob == blob3 > > + < 1 > > > + :echo blob is blob3 > > + < 0 > > + > > + ! Making a copy of a list is done with the |copy()| function. Using > [:] also > > + ! works, as explained above. > > Wasn't this meant to say "copy of a blob" instead of "copy of a list"? Yes, I'll fix it. -- hundred-and-one symptoms of being an internet addict: 222. You send more than 20 personal e-mails a day. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.1.0757
Tony wrote: > On Tue, Jan 15, 2019 at 10: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 > > Ah, this is much better. > > I suppose the item at todo.txt lines 142-143 can now be removed. > > I noticed one typo: at eval.txt line 1146: > :let bs = b[]" copy ov 0zDEADBEEF > "ov" should of course be "of". Thanks. Also "[]" should be "[:]". -- Your fault: core dumped /// 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: changes to runtime/doc/eval.txt
Dominique wrote: > Attached patch contains a few changes > to runtime/doc/eval.txt. Thanks! -- Don't be humble ... you're not that great. -- Golda Meir /// 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
* Bram Moolenaar [190115 16:52]: > > Patch 8.1.0757 > Problem:Not enough documentation for Blobs. > Solution: Add a section about Blobs. > Files:runtime/doc/eval.txt [snip] > ! 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 I would make the first example use an explicit non-(-1) index for the last index, then after that say that -1 means the last element and give this example. ...Marvin -- -- 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.