To: vim_dev@googlegroups.com Subject: Patch 8.2.3825 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3825 Problem: Various comments could be improved. Solution: Improve the comments. Files: src/getchar.c, src/mbyte.c, src/regexp_nfa.c, src/testdir/test_edit.vim, src/gui_motif.c *** ../vim-8.2.3824/src/getchar.c 2021-12-05 21:46:31.172891155 +0000 --- src/getchar.c 2021-12-07 21:40:34.461116782 +0000 *************** *** 2677,2683 **** if (mp == NULL) { *keylenp = keylen; ! return map_result_get; // got character, break for loop } } --- 2677,2683 ---- if (mp == NULL) { *keylenp = keylen; ! return map_result_get; // get character from typeahead } } *************** *** 3060,3066 **** typebuf.tb_off]; del_typebuf(1, 0); } ! break; } // not enough characters, get more --- 3060,3066 ---- typebuf.tb_off]; del_typebuf(1, 0); } ! break; // got character, break the for loop } // not enough characters, get more *** ../vim-8.2.3824/src/mbyte.c 2021-11-02 20:24:34.980003926 +0000 --- src/mbyte.c 2021-11-26 13:39:02.151506971 +0000 *************** *** 3847,3852 **** --- 3847,3857 ---- return (q == p) ? 0 : 1; } + /* + * Return offset from "p" to the start of a character, including composing + * characters. "base" must be the start of the string, which must be NUL + * terminated. + */ int utf_head_off(char_u *base, char_u *p) { *************** *** 4107,4112 **** --- 4112,4118 ---- /* * Return the offset from "p" to the last byte of the character it points * into. Can start anywhere in a stream of bytes. + * Composing characters are not included. */ int mb_tail_off(char_u *base, char_u *p) *** ../vim-8.2.3824/src/regexp_nfa.c 2021-12-05 21:46:31.172891155 +0000 --- src/regexp_nfa.c 2021-12-10 16:00:40.276123754 +0000 *************** *** 18,24 **** * The last three are enabled when compiled as debug mode and individually * disabled by commenting them out. * The log files can get quite big! ! * Do disable all of this when compiling Vim for debugging, undefine DEBUG in * regexp.c */ #ifdef DEBUG --- 18,24 ---- * The last three are enabled when compiled as debug mode and individually * disabled by commenting them out. * The log files can get quite big! ! * To disable all of this when compiling Vim for debugging, undefine DEBUG in * regexp.c */ #ifdef DEBUG *** ../vim-8.2.3824/src/testdir/test_edit.vim 2021-11-21 11:35:59.456938797 +0000 --- src/testdir/test_edit.vim 2021-12-13 19:13:19.517467397 +0000 *************** *** 1326,1331 **** --- 1326,1332 ---- call assert_fails(':Sandbox', 'E48:') delcom Sandbox call assert_equal(['a'], getline(1,'$')) + " 2) edit with textlock set fu! DoIt() call feedkeys("i\\", 'tnix') *************** *** 1345,1350 **** --- 1346,1352 ---- catch /^Vim\%((\a\+)\)\=:E117/ " catch E117: unknown function endtry au! InsertCharPre + " 3) edit when completion is shown fun! Complete(findstart, base) if a:findstart *************** *** 1362,1367 **** --- 1364,1370 ---- endtry delfu Complete set completefunc= + if has("rightleft") && exists("+fkmap") " 4) 'R' when 'fkmap' and 'revins' is set. set revins fkmap *** ../vim-8.2.3824/src/gui_motif.c 2021-03-29 19:10:23.152204702 +0100 --- src/gui_motif.c 2021-07-10 11:48:03.996991225 +0100 *************** *** 3995,4001 **** } /* ! * Synchronize all gui elements, which are dependant upon the * main text font used. Those are in esp. the find/replace dialogs. * If you don't understand why this should be needed, please try to * search for "pi\xea\xb6\xe6" in iso8859-2. --- 3995,4001 ---- } /* ! * Synchronize all gui elements, which are dependent upon the * main text font used. Those are in esp. the find/replace dialogs. * If you don't understand why this should be needed, please try to * search for "pi\xea\xb6\xe6" in iso8859-2. *** ../vim-8.2.3824/src/version.c 2021-12-16 13:06:06.958019734 +0000 --- src/version.c 2021-12-16 14:44:20.557651430 +0000 *************** *** 751,752 **** --- 751,754 ---- { /* Add new patch number below this line */ + /**/ + 3825, /**/ -- "Oh, no! NOT the Spanish Inquisition!" "NOBODY expects the Spanish Inquisition!!!" -- Monty Python sketch -- "Oh, no! NOT another option!" "EVERYBODY expects another option!!!" -- Discussion in vim-dev mailing list -- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///