comparison src/edit.c @ 27426:41e0dcf38521 v8.2.4241

patch 8.2.4241: some type casts are redundant Commit: https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27 Author: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com> Date: Fri Jan 28 15:28:04 2022 +0000 patch 8.2.4241: some type casts are redundant Problem: Some type casts are redundant. Solution: Remove the type casts. (closes https://github.com/vim/vim/issues/9643)
author Bram Moolenaar <Bram@vim.org>
date Fri, 28 Jan 2022 16:30:11 +0100
parents 7c07681f8a05
children fb4c30606b4a
comparison
equal deleted inserted replaced
27425:b5bd6c851b8a 27426:41e0dcf38521
521 mincol = curwin->w_wcol; 521 mincol = curwin->w_wcol;
522 validate_cursor_col(); 522 validate_cursor_col();
523 523
524 if ( 524 if (
525 #ifdef FEAT_VARTABS 525 #ifdef FEAT_VARTABS
526 (int)curwin->w_wcol < mincol - tabstop_at( 526 curwin->w_wcol < mincol - tabstop_at(
527 get_nolist_virtcol(), curbuf->b_p_ts, 527 get_nolist_virtcol(), curbuf->b_p_ts,
528 curbuf->b_p_vts_array) 528 curbuf->b_p_vts_array)
529 #else 529 #else
530 (int)curwin->w_wcol < mincol - curbuf->b_p_ts 530 (int)curwin->w_wcol < mincol - curbuf->b_p_ts
531 #endif 531 #endif
2132 2132
2133 if (c == NUL) // only formatting was wanted 2133 if (c == NUL) // only formatting was wanted
2134 return; 2134 return;
2135 2135
2136 // Check whether this character should end a comment. 2136 // Check whether this character should end a comment.
2137 if (did_ai && (int)c == end_comment_pending) 2137 if (did_ai && c == end_comment_pending)
2138 { 2138 {
2139 char_u *line; 2139 char_u *line;
2140 char_u lead_end[COM_MAX_LEN]; // end-comment string 2140 char_u lead_end[COM_MAX_LEN]; // end-comment string
2141 int middle_len, end_len; 2141 int middle_len, end_len;
2142 int i; 2142 int i;
2905 } 2905 }
2906 2906
2907 // may want to stuff the command character, to start Insert mode 2907 // may want to stuff the command character, to start Insert mode
2908 if (c != NUL) 2908 if (c != NUL)
2909 stuffcharReadbuff(c); 2909 stuffcharReadbuff(c);
2910 if ((esc_ptr = (char_u *)vim_strrchr(ptr, ESC)) != NULL) 2910 if ((esc_ptr = vim_strrchr(ptr, ESC)) != NULL)
2911 *esc_ptr = NUL; // remove the ESC 2911 *esc_ptr = NUL; // remove the ESC
2912 2912
2913 // when the last char is either "0" or "^" it will be quoted if no ESC 2913 // when the last char is either "0" or "^" it will be quoted if no ESC
2914 // comes after it OR if it will inserted more than once and "ptr" 2914 // comes after it OR if it will inserted more than once and "ptr"
2915 // starts with ^D. -- Acevedo 2915 // starts with ^D. -- Acevedo