Warning message seen when building memfile_test.c
Hi, I see the following warning message when running "make test" in a MacOS system: memfile_test.c:70:7: warning: incompatible pointer types assigning to 'mf_hashitem_T *' (aka 'struct mf_hashitem_S *') from 'mf_hashtab_T *' (aka 'struct mf_hashtab_S *') [-Wincompatible-pointer-types] item = LALLOC_CLEAR_ONE(mf_hashtab_T); ^ ~~ 1 warning generated. - Yegappan -- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7mpTHQ3Tv1PNm%2BFPOKycniKo%2B4nKRQ-tc-3xEjCZVrpwA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.1.1459
Dominique wrote: > This part of the patch 8.1.1459 looks incorrect: > > *** ../vim-8.1.1458/src/screen.c2019-06-03 22:04:17.840244968 +0200 > --- src/screen.c2019-06-03 22:11:26.973743554 +0200 > *** > *** 1078,1084 > + wp->w_height + wp->w_popup_padding[2] + > wp->w_popup_border[2]; > popup_attr = get_wcr_attr(wp); > > ! if (enc_utf8) > { > border_char[0] = border_char[2] = 0x2550; > border_char[1] = border_char[3] = 0x2551; > --- 1078,1086 > + wp->w_height + wp->w_popup_padding[2] + > wp->w_popup_border[2]; > popup_attr = get_wcr_attr(wp); > > ! // We can only use these line drawing characters when 'encoding' is > ! // "utf-8" and 'ambiwidth' is "single". > ! if (enc_utf8 && p_ambw == 's') > { > border_char[0] = border_char[2] = 0x2550; > border_char[1] = border_char[3] = 0x2551; > > > It's most certainly meant to check the condition > *p_ambw == 's' rather than p_ambw == 's'. > otherwise it's comparing a pointer with character 's' > which makes no sense. Somehow I missed the compiler warning. Fixed now. I also realized that the border characters from one popup were carried over to the next one if this block was skipped. Also fixed. -- >From "know your smileys": (:-# Said something he shouldn't have /// 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201906032111.x53LBxcn001805%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
Patch 8.1.1461
Patch 8.1.1461 Problem:Tests do not run or are not reliable on some systems. Solution: Use "findstr" instead of "grep" on MS-Windows. Clear PROMPT_COMMAND in the terminal test. Delete temp file. Wait for output after executing a debug command. (Yegappan Lakshmanan, closes #4479) Files: src/testdir/test_debugger.vim, src/testdir/test_environ.vim, src/testdir/test_filetype.vim, src/testdir/test_source.vim, src/testdir/test_terminal.vim *** ../vim-8.1.1460/src/testdir/test_debugger.vim 2019-04-20 22:28:38.961420148 +0200 --- src/testdir/test_debugger.vim 2019-06-03 22:39:43.551377080 +0200 *** *** 52,67 let buf = RunVimInTerminal('-S Xtest.vim', {}) " Start the Vim debugger ! call RunDbgCmd(buf, ':debug echo Foo()') " Create a few stack frames by stepping through functions ! call RunDbgCmd(buf, 'step') ! call RunDbgCmd(buf, 'step') ! call RunDbgCmd(buf, 'step') ! call RunDbgCmd(buf, 'step') ! call RunDbgCmd(buf, 'step') ! call RunDbgCmd(buf, 'step') ! call RunDbgCmd(buf, 'step') " check backtrace call RunDbgCmd(buf, 'backtrace', [ --- 52,67 let buf = RunVimInTerminal('-S Xtest.vim', {}) " Start the Vim debugger ! call RunDbgCmd(buf, ':debug echo Foo()', ['cmd: echo Foo()']) " Create a few stack frames by stepping through functions ! call RunDbgCmd(buf, 'step', ['line 1: let var1 = 1']) ! call RunDbgCmd(buf, 'step', ['line 2: let var2 = Bar(var1) + 9']) ! call RunDbgCmd(buf, 'step', ['line 1: let var1 = 2 + a:var']) ! call RunDbgCmd(buf, 'step', ['line 2: let var2 = Bazz(var1) + 4']) ! call RunDbgCmd(buf, 'step', ['line 1: try']) ! call RunDbgCmd(buf, 'step', ['line 2: let var1 = 3 + a:var']) ! call RunDbgCmd(buf, 'step', ['line 3: let var3 = "another var"']) " check backtrace call RunDbgCmd(buf, 'backtrace', [ *** ../vim-8.1.1460/src/testdir/test_environ.vim2019-05-09 14:52:22.083358820 +0200 --- src/testdir/test_environ.vim2019-06-03 22:39:43.551377080 +0200 *** *** 36,42 call setenv('FOO', v:null) if has('win32') ! let result = system('set | grep ^FOO=') else let result = system('env | grep ^FOO=') endif --- 36,42 call setenv('FOO', v:null) if has('win32') ! let result = system('set | findstr ^FOO=') else let result = system('env | grep ^FOO=') endif *** ../vim-8.1.1460/src/testdir/test_filetype.vim 2019-05-06 21:46:05.06258 +0200 --- src/testdir/test_filetype.vim 2019-06-03 22:39:43.551377080 +0200 *** *** 520,526 catch call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg) endtry ! call assert_equal(ft, , 'with file name: ' . names[i]) bwipe! endfor endfor --- 520,530 catch call assert_report('cannot edit "' . names[i] . '": ' . v:errmsg) endtry ! if == '' && ! " File exists but not able to edit it (permission denied) ! else ! call assert_equal(ft, , 'with file name: ' . names[i]) ! endif bwipe! endfor endfor *** ../vim-8.1.1460/src/testdir/test_source.vim 2019-05-22 22:38:21.660405578 +0200 --- src/testdir/test_source.vim 2019-06-03 22:39:43.551377080 +0200 *** *** 44,47 --- 44,48 call assert_equal('hello', getline(1)) call assert_fails('sandbox source! Xsourcehello', 'E48:') bwipe! + call delete('Xsourcehello') endfunc *** ../vim-8.1.1460/src/testdir/test_terminal.vim 2019-06-03 21:14:55.129048884 +0200 --- src/testdir/test_terminal.vim 2019-06-03 22:39:43.551377080 +0200 *** *** 8,13 --- 8,14 source screendump.vim let s:python = PythonProg() + let $PROMPT_COMMAND='' " Open a terminal with a shell, assign the job to g:job and return the buffer " number. *** ../vim-8.1.1460/src/version.c 2019-06-03 22:53:27.457687696 +0200 --- src/version.c 2019-06-03 22:54:33.433266568 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1461, /**/ -- >From "know your smileys": :q vi user saying, "How do I get out of this damn emacs editor?" /// 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
Re: Patch 8.1.1459
Dominique Pellé wrote: > This part of the patch 8.1.1459 looks incorrect: > > *** ../vim-8.1.1458/src/screen.c2019-06-03 22:04:17.840244968 +0200 > --- src/screen.c2019-06-03 22:11:26.973743554 +0200 > *** > *** 1078,1084 > + wp->w_height + wp->w_popup_padding[2] + > wp->w_popup_border[2]; > popup_attr = get_wcr_attr(wp); > > ! if (enc_utf8) > { > border_char[0] = border_char[2] = 0x2550; > border_char[1] = border_char[3] = 0x2551; > --- 1078,1086 > + wp->w_height + wp->w_popup_padding[2] + > wp->w_popup_border[2]; > popup_attr = get_wcr_attr(wp); > > ! // We can only use these line drawing characters when 'encoding' is > ! // "utf-8" and 'ambiwidth' is "single". > ! if (enc_utf8 && p_ambw == 's') > { > border_char[0] = border_char[2] = 0x2550; > border_char[1] = border_char[3] = 0x2551; > > > It's most certainly meant to check the condition > *p_ambw == 's' rather than p_ambw == 's'. > otherwise it's comparing a pointer with character 's' > which makes no sense. Never mind. I see that patch 8.1.1460 already fixed it. 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAON-T_i3FwcSEbFfgqPaHQuc44mb89N79cCVRY_W0zFpa4suyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.1.1459
This part of the patch 8.1.1459 looks incorrect: *** ../vim-8.1.1458/src/screen.c2019-06-03 22:04:17.840244968 +0200 --- src/screen.c2019-06-03 22:11:26.973743554 +0200 *** *** 1078,1084 + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2]; popup_attr = get_wcr_attr(wp); ! if (enc_utf8) { border_char[0] = border_char[2] = 0x2550; border_char[1] = border_char[3] = 0x2551; --- 1078,1086 + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2]; popup_attr = get_wcr_attr(wp); ! // We can only use these line drawing characters when 'encoding' is ! // "utf-8" and 'ambiwidth' is "single". ! if (enc_utf8 && p_ambw == 's') { border_char[0] = border_char[2] = 0x2550; border_char[1] = border_char[3] = 0x2551; It's most certainly meant to check the condition *p_ambw == 's' rather than p_ambw == 's'. otherwise it's comparing a pointer with character 's' which makes no sense. 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAON-T_jZSHEyr%2BbepidZLSHEDUY6Ja%3Dimty%3D1fizdOTAx6raMg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.1.1460
Patch 8.1.1460 Problem:Popup window border characters may be wrong. Solution: Reset the border characters for each popup. Correct use of 'ambiwidth'. Files: src/screen.c *** ../vim-8.1.1459/src/screen.c2019-06-03 22:21:23.630304492 +0200 --- src/screen.c2019-06-03 22:50:48.970711776 +0200 *** *** 1041,1047 int total_height; int popup_attr; int border_attr[4]; ! int border_char[8] = {'-', '|', '-', '|', '+', '+', '+', '+', }; char_u buf[MB_MAXBYTES]; int row; int i; --- 1041,1047 int total_height; int popup_attr; int border_attr[4]; ! int border_char[8]; char_u buf[MB_MAXBYTES]; int row; int i; *** *** 1080,1086 // We can only use these line drawing characters when 'encoding' is // "utf-8" and 'ambiwidth' is "single". ! if (enc_utf8 && p_ambw == 's') { border_char[0] = border_char[2] = 0x2550; border_char[1] = border_char[3] = 0x2551; --- 1080,1086 // We can only use these line drawing characters when 'encoding' is // "utf-8" and 'ambiwidth' is "single". ! if (enc_utf8 && *p_ambw == 's') { border_char[0] = border_char[2] = 0x2550; border_char[1] = border_char[3] = 0x2551; *** *** 1089,1094 --- 1089,1101 border_char[6] = 0x255d; border_char[7] = 0x255a; } + else + { + border_char[0] = border_char[2] = '-'; + border_char[1] = border_char[3] = '|'; + for (i = 4; i < 8; ++i) + border_char[i] = '+'; + } for (i = 0; i < 8; ++i) if (wp->w_border_char[i] != 0) border_char[i] = wp->w_border_char[i]; *** ../vim-8.1.1459/src/version.c 2019-06-03 22:21:23.630304492 +0200 --- src/version.c 2019-06-03 22:53:10.653795386 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1460, /**/ -- Where do you want to crash today? /// 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201906032053.x53KrjPB026112%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
Patch 8.1.1459
Patch 8.1.1459 Problem:Popup window border looks bad when 'ambiwidth' is "double". (Yasuhiro Matsumoto) Solution: Only use line drawing characters when 'ambiwidth' is "single". (Ken Takata, closes #4477) Files: src/screen.c *** ../vim-8.1.1458/src/screen.c2019-06-03 22:04:17.840244968 +0200 --- src/screen.c2019-06-03 22:11:26.973743554 +0200 *** *** 1078,1084 + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2]; popup_attr = get_wcr_attr(wp); ! if (enc_utf8) { border_char[0] = border_char[2] = 0x2550; border_char[1] = border_char[3] = 0x2551; --- 1078,1086 + wp->w_height + wp->w_popup_padding[2] + wp->w_popup_border[2]; popup_attr = get_wcr_attr(wp); ! // We can only use these line drawing characters when 'encoding' is ! // "utf-8" and 'ambiwidth' is "single". ! if (enc_utf8 && p_ambw == 's') { border_char[0] = border_char[2] = 0x2550; border_char[1] = border_char[3] = 0x2551; *** ../vim-8.1.1458/src/version.c 2019-06-03 22:04:17.840244968 +0200 --- src/version.c 2019-06-03 22:13:41.852963537 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1459, /**/ -- >From "know your smileys": |-PReaction to unusually ugly C code /// 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201906032022.x53KM3Ci015361%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
Patch 8.1.1458
Patch 8.1.1458 Problem:Crash when using gtags. (issue #4102) Solution: Check for negative row or col in screen_puts_len(). (Christian Brabandt) Files: src/screen.c *** ../vim-8.1.1457/src/screen.c2019-06-02 20:33:27.018782294 +0200 --- src/screen.c2019-06-03 22:01:02.461393381 +0200 *** *** 7707,7713 int force_redraw_next = FALSE; int need_redraw; ! if (ScreenLines == NULL || row >= screen_Rows)/* safety check */ return; off = LineOffset[row] + col; --- 7707,7717 int force_redraw_next = FALSE; int need_redraw; ! // Safety check. The check for negative row and column is to fix issue ! // #4102. TODO: find out why row/col could be negative. ! if (ScreenLines == NULL ! || row >= screen_Rows || row < 0 ! || col >= screen_Columns || col < 0) return; off = LineOffset[row] + col; *** ../vim-8.1.1457/src/version.c 2019-06-03 21:14:55.129048884 +0200 --- src/version.c 2019-06-03 22:03:37.712481097 +0200 *** *** 769,770 --- 769,772 { /* Add new patch number below this line */ + /**/ + 1458, /**/ -- You are only young once, but you can stay immature indefinitely. /// 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201906032004.x53K4j2L011494%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
Re: [vim/vim] doc: signs: clarifications for priority / order (#4482)
Hi, On Mon, Jun 3, 2019 at 10:12 AM Daniel Hahler wrote: > > https://github.com/vim/vim/blob/98fb65cb051f625f4ce291a9f9cdb2e54ac1e688/runtime/doc/sign.txt#L185-L187: > > The priority is used to determine the > highlight group used when multiple signs are placed on the > same line. > > I assume it is not just used for the highlight group, but for the sign being > displayed altogether? > Yes. The sign priority is used to determine the sign that will be displayed in a line. > > At least that's how I would expect it, and a quick test shows that this is > the case, using: > > sign define mysign1 text=s1 texthl=Error > sign define mysign2 text=s2 texthl=Todo > > exe 'sign unplace * buffer='.bufnr('%') > sign place 1 line=1 name=mysign1 priority=10 > sign place 2 line=1 name=mysign2 priority=20 > sign place 3 line=1 name=mysign1 priority=10 > > echo map(sign_getplaced(bufnr('%'))[0].signs, 'v:val.name') > > It displays ['mysign2', 'mysign1', 'mysign1'], and the sign text is "s2" > (with its highlight). > > It should also be clarified with sign_getplaced() which currently only says: > > The returned signs in a buffer are ordered by their line > number. > > From my observation it returns signs as being displayed (first entry is the > visible one). > Yes. The sign_getplaced() function returns all the signs placed in a buffer. If multiple signs are placed on a line, then the signs are sorted by their priority. If two or more signs have the same priority, then they are sorted by their order of placement (the last placed sign takes precedence over the older ones). - Yegappan > > Something to consider here is also signs with the same ID - from my > observation the last placed > one is visible, regardless of priority (i.e. if placing id=1 with > priority=50, and then with > priority=10, it will display the 2nd one). > > sign-priority appears to be clear(er) about it already. > -- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7%3DEwMaK8FMk5p2jRQoJYKWvZnwKeJ0%3DNnUbJ85wQ613NA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.1.1457
Patch 8.1.1457 Problem:Cannot reuse a buffer when loading a screen dump. Solution: Add the "bufnr" option. Files: runtime/doc/eval.txt, src/structs.h, src/channel.c, src/terminal.c, src/testdir/test_terminal.vim *** ../vim-8.1.1456/runtime/doc/eval.txt2019-05-30 18:40:20.120405138 +0200 --- runtime/doc/eval.txt2019-06-03 20:02:23.894159435 +0200 *** *** 9557,9562 --- 9558,9568 "curwin" use the current window, do not split the window; fails if the current buffer cannot be |abandon|ed + "bufnr" do not create a new buffer, use the +existing buffer "bufnr". This buffer +must have been previously created with +term_dumpdiff() or term_dumpload() and +visible in a window. "norestore" do not add the terminal window to a session file *** ../vim-8.1.1456/src/structs.h 2019-06-02 18:40:02.637508840 +0200 --- src/structs.h 2019-06-03 20:17:25.897778944 +0200 *** *** 1807,1812 --- 1807,1813 #define JO2_TERM_KILL 0x4000 /* "term_kill" */ #define JO2_ANSI_COLORS 0x8000 /* "ansi_colors" */ #define JO2_TTY_TYPE 0x1 /* "tty_type" */ + #define JO2_BUFNR 0x2 /* "bufnr" */ #define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE) #define JO_CB_ALL \ *** *** 1864,1869 --- 1865,1871 int jo_term_cols; int jo_vertical; int jo_curwin; + buf_T *jo_bufnr_buf; int jo_hidden; int jo_term_norestore; char_u*jo_term_name; *** ../vim-8.1.1456/src/channel.c 2019-06-01 13:28:30.269829512 +0200 --- src/channel.c 2019-06-03 20:26:34.991095446 +0200 *** *** 4901,4906 --- 4901,4932 opt->jo_set2 |= JO2_CURWIN; opt->jo_curwin = tv_get_number(item); } + else if (STRCMP(hi->hi_key, "bufnr") == 0) + { + int nr; + + if (!(supported2 & JO2_CURWIN)) + break; + opt->jo_set2 |= JO2_BUFNR; + nr = tv_get_number(item); + if (nr <= 0) + { + semsg(_(e_invargNval), hi->hi_key, tv_get_string(item)); + return FAIL; + } + opt->jo_bufnr_buf = buflist_findnr(nr); + if (opt->jo_bufnr_buf == NULL) + { + semsg(_(e_nobufnr), (long)nr); + return FAIL; + } + if (opt->jo_bufnr_buf->b_nwindows == 0 + || opt->jo_bufnr_buf->b_term == NULL) + { + semsg(_(e_invarg2), "bufnr"); + return FAIL; + } + } else if (STRCMP(hi->hi_key, "hidden") == 0) { if (!(supported2 & JO2_HIDDEN)) *** ../vim-8.1.1456/src/terminal.c 2019-05-28 23:08:12.080648632 +0200 --- src/terminal.c 2019-06-03 20:37:45.571814232 +0200 *** *** 4616,4622 term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff) { jobopt_T opt; ! buf_T *buf; char_ubuf1[NUMBUFLEN]; char_ubuf2[NUMBUFLEN]; char_u*fname1; --- 4616,4622 term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff) { jobopt_T opt; ! buf_T *buf = NULL; char_ubuf1[NUMBUFLEN]; char_ubuf2[NUMBUFLEN]; char_u*fname1; *** *** 4671,4677 } } ! buf = term_start([0], NULL, , TERM_START_NOJOB); if (buf != NULL && buf->b_term != NULL) { int i; --- 4671,4697 } } ! if (opt.jo_bufnr_buf != NULL) ! { ! win_T *wp = buf_jump_open_win(opt.jo_bufnr_buf); ! ! // With "bufnr" argument: enter the window with this buffer and make it ! // empty. ! if (wp == NULL) ! semsg(_(e_invarg2), "bufnr"); ! else ! { ! buf = curbuf; ! while (!(curbuf->b_ml.ml_flags & ML_EMPTY)) ! ml_delete((linenr_T)1, FALSE); ! ga_clear(>b_term->tl_scrollback); ! redraw_later(NOT_VALID); ! } ! } ! else ! // Create a new terminal window. ! buf = term_start([0], NULL, , TERM_START_NOJOB); ! if (buf != NULL && buf->b_term != NULL) { int i; *** ../vim-8.1.1456/src/testdir/test_terminal.vim 2019-05-20 22:12:30.724442773 +0200 --- src/testdir/test_terminal.vim 2019-06-03
Re: [patch] Trivial fixes for popup
Ken Takata wrote: > Here are some fixes for comments and indents. > Please check. Thanks. I'll include it with the next change to popupwin.c -- >From "know your smileys": !-|I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth /// 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201906031231.x53CVvP6030543%40masaka.moolenaar.net. For more options, visit https://groups.google.com/d/optout.
[patch] Trivial fixes for popup
Hi, Here are some fixes for comments and indents. Please check. Regards, Ken Takata -- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/87fd9403-dffe-4dcd-ade0-5f479587a6f5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. # HG changeset patch # Parent 1c753dc934df1562605ad7c095284ffd81166b29 diff --git a/src/popupwin.c b/src/popupwin.c --- a/src/popupwin.c +++ b/src/popupwin.c @@ -186,7 +186,7 @@ apply_options(win_T *wp, buf_T *buf UNUS wp->w_zindex = dict_get_number(dict, (char_u *)"zindex"); -#if defined(FEAT_TIMERS) +# if defined(FEAT_TIMERS) // Add timer to close the popup after some time. nr = dict_get_number(dict, (char_u *)"time"); if (nr > 0) @@ -204,7 +204,7 @@ apply_options(win_T *wp, buf_T *buf UNUS clear_tv(); } } -#endif +# endif // Option values resulting in setting an option. str = dict_get_string(dict, (char_u *)"highlight", FALSE); @@ -565,7 +565,7 @@ typedef enum /* * popup_create({text}, {options}) * popup_atcursor({text}, {options}) - * When called from f_popup_atcursor() "atcursor" is TRUE. + * When called from f_popup_atcursor() "type" is TYPE_ATCURSOR. */ static void popup_create(typval_T *argvars, typval_T *rettv, create_type_T type) @@ -984,7 +984,7 @@ f_popup_getpos(typval_T *argvars, typval } /* - * f_popup_getoptions({id}) + * popup_getoptions({id}) */ void f_popup_getoptions(typval_T *argvars, typval_T *rettv)
Re: Plugin config functions
Thanks for the detailed response. > I don't really see the difference between configuring via global > variable or by calling a function in your vimrc. Your plugin doesn't > need to check vim's global variable every time you use a feature, just > check it once during plugin initialization and set some internal > variable (supposing your plugin is written in go/python/etc). There is > no expectation to the user that modifying `g:govim_whatever` will take > immediate effect after the plugin has already started (if you want you > can provide a :GovimReload or similar). You can also do validation just > once when you are saving the values. Understood, thanks. The point about the user's expectation on changing the config value at runtime is key; I'd like to provide an approach that will work either in vimrc (i.e. pre-init) or at runtime (i.e. post init). > Another option is to use a separate .json or .ini file for configuration > so you don't have to worry about vimrc/plugin sourcing order. But this > is less idiomatic than putting settings in a single g: dictionary. Agreed, I'd like to avoid this. > To address the direct question, a standard is to use autoloaded > functions, `call myplugin#configure()`. This merely requires the plugin > to be in the runtimepath which is handled by :Plug or packadd! A > seperate standard is to use User autocmd which requests the user call > some myplugin#configure() function- if the autocmd is fired the plugin > is definitely loaded and ready to get options set. autoload appears to be exactly what I'm after, thank you. I'll give this approach a try. Thanks again. -- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CACoUkn5qJJ2WjAy41_8bhmW02edEzAiytHX0QAzZXQX8k40vqA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Patch for fixing an issue with hitest.vim
Hi, I have tried to contact the author of hitest.vim a few days ago, but didn’t get any answer yet. Anyway, hopefully it’s on this list, too. I get E348 with runtime syntax/hitest.vim when whichwrap is set to a value different from the default. To reproduce: 1. create vimrc-hitest with the following content: set whichwrap=b,~,<,>,[,],h,l hi StatusLine guifg=#64878f guibg=#ff guisp=NONE gui=reverse cterm=reverse hi! link StatusLineTerm StatusLine 2. vim -N -i NONE -u vimrc-hitest 3. runtime syntax/hitest.vim The proposed patch fixes it for me. It also adds ‘silent' to the highlight command to avoid flashing the screen. Life. -- -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/A5854C2C-7EE4-420F-AFE1-129D00089CD3%40icloud.com. For more options, visit https://groups.google.com/d/optout. hitest-whichwrap.diff Description: Binary data