Mercurial > vim
comparison src/misc1.c @ 15543:dd725a8ab112 v8.1.0779
patch 8.1.0779: argument for message functions is inconsistent
commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 19 17:43:09 2019 +0100
patch 8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Jan 2019 17:45:07 +0100 |
parents | 3ef31ce9d9f9 |
children | d89c5b339c2a |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
3466 */ | 3466 */ |
3467 msg_start(); | 3467 msg_start(); |
3468 if (msg_row == Rows - 1) | 3468 if (msg_row == Rows - 1) |
3469 msg_col = col; | 3469 msg_col = col; |
3470 msg_source(HL_ATTR(HLF_W)); | 3470 msg_source(HL_ATTR(HLF_W)); |
3471 MSG_PUTS_ATTR(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST); | 3471 msg_puts_attr(_(w_readonly), HL_ATTR(HLF_W) | MSG_HIST); |
3472 #ifdef FEAT_EVAL | 3472 #ifdef FEAT_EVAL |
3473 set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1); | 3473 set_vim_var_string(VV_WARNINGMSG, (char_u *)_(w_readonly), -1); |
3474 #endif | 3474 #endif |
3475 msg_clr_eos(); | 3475 msg_clr_eos(); |
3476 (void)msg_end(); | 3476 (void)msg_end(); |
3740 } | 3740 } |
3741 else if (c == K_DEL || c == K_KDEL || c == K_BS || c == Ctrl_H) | 3741 else if (c == K_DEL || c == K_KDEL || c == K_BS || c == Ctrl_H) |
3742 { | 3742 { |
3743 if (typed > 0) | 3743 if (typed > 0) |
3744 { | 3744 { |
3745 MSG_PUTS("\b \b"); | 3745 msg_puts("\b \b"); |
3746 --typed; | 3746 --typed; |
3747 } | 3747 } |
3748 n /= 10; | 3748 n /= 10; |
3749 } | 3749 } |
3750 #ifdef FEAT_MOUSE | 3750 #ifdef FEAT_MOUSE |
3784 int save_cmdline_row; | 3784 int save_cmdline_row; |
3785 int save_State; | 3785 int save_State; |
3786 | 3786 |
3787 /* When using ":silent" assume that <CR> was entered. */ | 3787 /* When using ":silent" assume that <CR> was entered. */ |
3788 if (mouse_used != NULL) | 3788 if (mouse_used != NULL) |
3789 MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): ")); | 3789 msg_puts(_("Type number and <Enter> or click with mouse (empty cancels): ")); |
3790 else | 3790 else |
3791 MSG_PUTS(_("Type number and <Enter> (empty cancels): ")); | 3791 msg_puts(_("Type number and <Enter> (empty cancels): ")); |
3792 | 3792 |
3793 // Set the state such that text can be selected/copied/pasted and we still | 3793 // Set the state such that text can be selected/copied/pasted and we still |
3794 // get mouse events. redraw_after_callback() will not redraw if cmdline_row | 3794 // get mouse events. redraw_after_callback() will not redraw if cmdline_row |
3795 // is zero. | 3795 // is zero. |
3796 save_cmdline_row = cmdline_row; | 3796 save_cmdline_row = cmdline_row; |
3844 pn = -n; | 3844 pn = -n; |
3845 | 3845 |
3846 if (pn > p_report) | 3846 if (pn > p_report) |
3847 { | 3847 { |
3848 if (n > 0) | 3848 if (n > 0) |
3849 vim_snprintf((char *)msg_buf, MSG_BUF_LEN, | 3849 vim_snprintf(msg_buf, MSG_BUF_LEN, |
3850 NGETTEXT("%ld more line", "%ld more lines", pn), pn); | 3850 NGETTEXT("%ld more line", "%ld more lines", pn), pn); |
3851 else | 3851 else |
3852 vim_snprintf((char *)msg_buf, MSG_BUF_LEN, | 3852 vim_snprintf(msg_buf, MSG_BUF_LEN, |
3853 NGETTEXT("%ld line less", "%ld fewer lines", pn), pn); | 3853 NGETTEXT("%ld line less", "%ld fewer lines", pn), pn); |
3854 if (got_int) | 3854 if (got_int) |
3855 vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); | 3855 vim_strcat((char_u *)msg_buf, (char_u *)_(" (Interrupted)"), |
3856 MSG_BUF_LEN); | |
3856 if (msg(msg_buf)) | 3857 if (msg(msg_buf)) |
3857 { | 3858 { |
3858 set_keep_msg(msg_buf, 0); | 3859 set_keep_msg((char_u *)msg_buf, 0); |
3859 keep_msg_more = TRUE; | 3860 keep_msg_more = TRUE; |
3860 } | 3861 } |
3861 } | 3862 } |
3862 } | 3863 } |
3863 | 3864 |
3934 * a script or executing a function give the user a hint where the beep | 3935 * a script or executing a function give the user a hint where the beep |
3935 * comes from. */ | 3936 * comes from. */ |
3936 if (vim_strchr(p_debug, 'e') != NULL) | 3937 if (vim_strchr(p_debug, 'e') != NULL) |
3937 { | 3938 { |
3938 msg_source(HL_ATTR(HLF_W)); | 3939 msg_source(HL_ATTR(HLF_W)); |
3939 msg_attr((char_u *)_("Beep!"), HL_ATTR(HLF_W)); | 3940 msg_attr(_("Beep!"), HL_ATTR(HLF_W)); |
3940 } | 3941 } |
3941 } | 3942 } |
3942 } | 3943 } |
3943 | 3944 |
3944 /* | 3945 /* |