comparison src/undo.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 55ccc2d353bd
children 6f1c7e9a6393
comparison
equal deleted inserted replaced
15542:5baedae7ca7a 15543:dd725a8ab112
1639 /* If there is no undo information at all, quit here after deleting any 1639 /* If there is no undo information at all, quit here after deleting any
1640 * existing undo file. */ 1640 * existing undo file. */
1641 if (buf->b_u_numhead == 0 && buf->b_u_line_ptr.ul_line == NULL) 1641 if (buf->b_u_numhead == 0 && buf->b_u_line_ptr.ul_line == NULL)
1642 { 1642 {
1643 if (p_verbose > 0) 1643 if (p_verbose > 0)
1644 verb_msg((char_u *)_("Skipping undo file write, nothing to undo")); 1644 verb_msg(_("Skipping undo file write, nothing to undo"));
1645 goto theend; 1645 goto theend;
1646 } 1646 }
1647 1647
1648 fd = mch_open((char *)file_name, 1648 fd = mch_open((char *)file_name,
1649 O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm); 1649 O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
2230 /* stick curbuf->b_u_curhead at end */ 2230 /* stick curbuf->b_u_curhead at end */
2231 curbuf->b_u_curhead = curbuf->b_u_oldhead; 2231 curbuf->b_u_curhead = curbuf->b_u_oldhead;
2232 beep_flush(); 2232 beep_flush();
2233 if (count == startcount - 1) 2233 if (count == startcount - 1)
2234 { 2234 {
2235 MSG(_("Already at oldest change")); 2235 msg(_("Already at oldest change"));
2236 return; 2236 return;
2237 } 2237 }
2238 break; 2238 break;
2239 } 2239 }
2240 2240
2245 if (curbuf->b_u_curhead == NULL || get_undolevel() <= 0) 2245 if (curbuf->b_u_curhead == NULL || get_undolevel() <= 0)
2246 { 2246 {
2247 beep_flush(); /* nothing to redo */ 2247 beep_flush(); /* nothing to redo */
2248 if (count == startcount - 1) 2248 if (count == startcount - 1)
2249 { 2249 {
2250 MSG(_("Already at newest change")); 2250 msg(_("Already at newest change"));
2251 return; 2251 return;
2252 } 2252 }
2253 break; 2253 break;
2254 } 2254 }
2255 2255
2493 } 2493 }
2494 2494
2495 if (closest == closest_start) 2495 if (closest == closest_start)
2496 { 2496 {
2497 if (step < 0) 2497 if (step < 0)
2498 MSG(_("Already at oldest change")); 2498 msg(_("Already at oldest change"));
2499 else 2499 else
2500 MSG(_("Already at newest change")); 2500 msg(_("Already at newest change"));
2501 return; 2501 return;
2502 } 2502 }
2503 2503
2504 target = closest_seq; 2504 target = closest_seq;
2505 dosec = FALSE; 2505 dosec = FALSE;
3102 } 3102 }
3103 } 3103 }
3104 } 3104 }
3105 3105
3106 if (ga.ga_len == 0) 3106 if (ga.ga_len == 0)
3107 MSG(_("Nothing to undo")); 3107 msg(_("Nothing to undo"));
3108 else 3108 else
3109 { 3109 {
3110 sort_strings((char_u **)ga.ga_data, ga.ga_len); 3110 sort_strings((char_u **)ga.ga_data, ga.ga_len);
3111 3111
3112 msg_start(); 3112 msg_start();
3113 msg_puts_attr((char_u *)_("number changes when saved"), 3113 msg_puts_attr(_("number changes when saved"),
3114 HL_ATTR(HLF_T)); 3114 HL_ATTR(HLF_T));
3115 for (i = 0; i < ga.ga_len && !got_int; ++i) 3115 for (i = 0; i < ga.ga_len && !got_int; ++i)
3116 { 3116 {
3117 msg_putchar('\n'); 3117 msg_putchar('\n');
3118 if (got_int) 3118 if (got_int)
3119 break; 3119 break;
3120 msg_puts(((char_u **)ga.ga_data)[i]); 3120 msg_puts(((char **)ga.ga_data)[i]);
3121 } 3121 }
3122 msg_end(); 3122 msg_end();
3123 3123
3124 ga_clear_strings(&ga); 3124 ga_clear_strings(&ga);
3125 } 3125 }