Re: Patch 9.0.0683
John Marriott wrote: > On 08-Oct-2022 01:11, Bram Moolenaar wrote: > > Patch 9.0.0683 > > Problem:Cannot specify a time for :echowindow. > > Solution: A count can be used to specify the display time. Add > > popup_findecho(). > > Files: runtime/doc/eval.txt, runtime/doc/popup.txt, > > runtime/doc/builtin.txt, runtime/doc/usr_41.txt, src/eval.c, > > src/popupwin.c, src/proto/popupwin.pro, src/evalfunc.c, > > src/ex_cmds.h, src/vim9.h, src/vim9compile.c, > > src/vim9execute.c, > > src/vim9cmds.c, src/proto/vim9cmds.pro, src/vim9instr.c, > > src/proto/vim9instr.pro, src/testdir/test_vim9_disassemble.vim, > > src/testdir/test_messages.vim, > > src/testdir/dumps/Test_echowindow_8.dump, > > src/testdir/dumps/Test_echowindow_9.dump > > > > > After this patch mingw64 (gcc 12.2.0) spits out this warning if > HAS_MESSAGE_WINDOW is not defined: > > gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 > -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO > -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return > -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o > gobjnative/vim9compile.o > vim9compile.c:2691:1: warning: 'get_cmd_count' defined but not used > [-Wunused-function] > 2691 | get_cmd_count(char_u *line, exarg_T *eap) > | ^ > > > The attached patch tries to fix it. Thanks. It was intended as a generic function, but only used in one place right now. -- "To whoever finds this note - I have been imprisoned by my father who wishes me to marry against my will. Please please please please come and rescue me. I am in the tall tower of Swamp Castle." SIR LAUNCELOT's eyes light up with holy inspiration. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- b...@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/// -- -- 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/20221007214848.7505B1C0592%40moolenaar.net.
Re: Patch 9.0.0683
On 08-Oct-2022 01:11, Bram Moolenaar wrote: Patch 9.0.0683 Problem:Cannot specify a time for :echowindow. Solution: A count can be used to specify the display time. Add popup_findecho(). Files: runtime/doc/eval.txt, runtime/doc/popup.txt, runtime/doc/builtin.txt, runtime/doc/usr_41.txt, src/eval.c, src/popupwin.c, src/proto/popupwin.pro, src/evalfunc.c, src/ex_cmds.h, src/vim9.h, src/vim9compile.c, src/vim9execute.c, src/vim9cmds.c, src/proto/vim9cmds.pro, src/vim9instr.c, src/proto/vim9instr.pro, src/testdir/test_vim9_disassemble.vim, src/testdir/test_messages.vim, src/testdir/dumps/Test_echowindow_8.dump, src/testdir/dumps/Test_echowindow_9.dump After this patch mingw64 (gcc 12.2.0) spits out this warning if HAS_MESSAGE_WINDOW is not defined: gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie -fPIE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD vim9compile.c -o gobjnative/vim9compile.o vim9compile.c:2691:1: warning: 'get_cmd_count' defined but not used [-Wunused-function] 2691 | get_cmd_count(char_u *line, exarg_T *eap) | ^ The attached patch tries to fix it. Cheers John -- -- 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/a11c12f7-4e5b-5356-2be0-ce6fde1d9c89%40internode.on.net. --- vim9compile.c.orig 2022-10-08 08:24:06.703862100 +1100 +++ vim9compile.c 2022-10-08 08:34:02.065949600 +1100 @@ -2682,6 +2682,7 @@ return r; } +#ifdef HAS_MESSAGE_WINDOW /* * Get a count before a command. Can only be a number. * Returns zero if there is no count. @@ -2707,6 +2708,7 @@ } return atol((char *)p); } +#endif /* * Get the compilation type that should be used for "ufunc".
Patch 9.0.0683
Patch 9.0.0683 Problem:Cannot specify a time for :echowindow. Solution: A count can be used to specify the display time. Add popup_findecho(). Files: runtime/doc/eval.txt, runtime/doc/popup.txt, runtime/doc/builtin.txt, runtime/doc/usr_41.txt, src/eval.c, src/popupwin.c, src/proto/popupwin.pro, src/evalfunc.c, src/ex_cmds.h, src/vim9.h, src/vim9compile.c, src/vim9execute.c, src/vim9cmds.c, src/proto/vim9cmds.pro, src/vim9instr.c, src/proto/vim9instr.pro, src/testdir/test_vim9_disassemble.vim, src/testdir/test_messages.vim, src/testdir/dumps/Test_echowindow_8.dump, src/testdir/dumps/Test_echowindow_9.dump *** ../vim-9.0.0682/runtime/doc/eval.txt2022-09-17 21:07:52.087993184 +0100 --- runtime/doc/eval.txt2022-10-07 12:26:56.512246269 +0100 *** *** 3876,3886 when the screen is redrawn. *:echow* *:echowin* *:echowindow* ! :echow[indow] {expr1} .. Like |:echomsg| but when the messages popup window is available the message is displayed there. This means it will show for three seconds and avoid a ! |hit-enter| prompt. The message window is available when Vim was compiled with the +timer and the +popupwin features. --- 3392,3408 when the screen is redrawn. *:echow* *:echowin* *:echowindow* ! :[N]echow[indow] {expr1} .. Like |:echomsg| but when the messages popup window is available the message is displayed there. This means it will show for three seconds and avoid a ! |hit-enter| prompt. If you want to hide it before ! that, press Esc in Normal mode (when it would ! otherwise beep). If it disappears too soon you can ! use `:messages` to see the text. ! When [N] is given then the window will show up for ! this number of seconds. The last `:echowindow` with a ! count matters, it is used once only. The message window is available when Vim was compiled with the +timer and the +popupwin features. *** ../vim-9.0.0682/runtime/doc/popup.txt 2022-06-28 11:21:06.0 +0100 --- runtime/doc/popup.txt 2022-10-07 13:26:09.913130845 +0100 *** *** 347,352 --- 347,358 See the example here: |popup_dialog-example| + popup_findecho() *popup_findecho()* + Get the |window-ID| for the popup that shows messages for the + `:echowindow` command. Return zero if there is none. + Mainly useful to hide the popup. + + popup_findinfo() *popup_findinfo()* Get the |window-ID| for the popup info window, as it used by the popup menu. See |complete-popup|. The info popup is *** ../vim-9.0.0682/runtime/doc/builtin.txt 2022-09-29 13:50:04.711222464 +0100 --- runtime/doc/builtin.txt 2022-10-07 13:26:44.753113159 +0100 *** *** 395,400 --- 396,402 popup_dialog({what}, {options}) Numbercreate a popup window used as a dialog popup_filter_menu({id}, {key}) Numberfilter for a menu popup window popup_filter_yesno({id}, {key}) Numberfilter for a dialog popup window + popup_findecho() Number get window ID of popup for `:echowin` popup_findinfo() Number get window ID of info popup window popup_findpreview() Number get window ID of preview popup window popup_getoptions({id})Dictget options of popup window {id} *** ../vim-9.0.0682/runtime/doc/usr_41.txt 2022-09-12 13:38:01.390578399 +0100 --- runtime/doc/usr_41.txt 2022-10-07 13:27:50.993070199 +0100 *** *** 1288,1293 --- 1289,1295 popup_filter_yesno()block until 'y' or 'n' is pressed popup_getoptions() get current options for a popup popup_getpos() get actual position and size of a popup + popup_findecho()get window ID for popup used for `:echowindow` popup_findinfo()get window ID for popup info window popup_findpreview() get window ID for popup preview window popup_list()get list of all popup window IDs *** ../vim-9.0.0682/src/eval.c 2022-10-01 19:43:48.602494034 +0100 --- src/eval.c 2022-10-07 12:53:44.961135481 +0100 *** *** 6916,6922 else if (eap->cmdidx == CMD_echowindow) { #if