Mercurial > vim
comparison src/normal.c @ 32009:4545f58c8490 v9.0.1336
patch 9.0.1336: functions without arguments are not always declared properly
Commit: https://github.com/vim/vim/commit/a23a11b5bf03454b71fdb5deac0d5f641e222160
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Feb 21 14:27:41 2023 +0000
patch 9.0.1336: functions without arguments are not always declared properly
Problem: Functions without arguments are not always declared properly.
Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/12031)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 21 Feb 2023 15:30:08 +0100 |
parents | 479c93ad4a3b |
children | 55926b4f2246 |
comparison
equal
deleted
inserted
replaced
32008:6b51ad8c5e8e | 32009:4545f58c8490 |
---|---|
974 reset_reg_var(); | 974 reset_reg_var(); |
975 #endif | 975 #endif |
976 | 976 |
977 // Reset finish_op, in case it was set | 977 // Reset finish_op, in case it was set |
978 #ifdef CURSOR_SHAPE | 978 #ifdef CURSOR_SHAPE |
979 c = finish_op; | 979 int prev_finish_op = finish_op; |
980 #endif | 980 #endif |
981 finish_op = FALSE; | 981 finish_op = FALSE; |
982 may_trigger_modechanged(); | 982 may_trigger_modechanged(); |
983 #ifdef CURSOR_SHAPE | 983 #ifdef CURSOR_SHAPE |
984 // Redraw the cursor with another shape, if we were in Operator-pending | 984 // Redraw the cursor with another shape, if we were in Operator-pending |
985 // mode or did a replace command. | 985 // mode or did a replace command. |
986 if (c || ca.cmdchar == 'r') | 986 if (prev_finish_op || ca.cmdchar == 'r') |
987 { | 987 { |
988 ui_cursor_shape(); // may show different cursor shape | 988 ui_cursor_shape(); // may show different cursor shape |
989 # ifdef FEAT_MOUSESHAPE | 989 # ifdef FEAT_MOUSESHAPE |
990 update_mouseshape(-1); | 990 update_mouseshape(-1); |
991 # endif | 991 # endif |
1108 * End Visual mode. | 1108 * End Visual mode. |
1109 * This function or the next should ALWAYS be called to end Visual mode, except | 1109 * This function or the next should ALWAYS be called to end Visual mode, except |
1110 * from do_pending_operator(). | 1110 * from do_pending_operator(). |
1111 */ | 1111 */ |
1112 void | 1112 void |
1113 end_visual_mode() | 1113 end_visual_mode(void) |
1114 { | 1114 { |
1115 end_visual_mode_keep_button(); | 1115 end_visual_mode_keep_button(); |
1116 reset_held_button(); | 1116 reset_held_button(); |
1117 } | 1117 } |
1118 | 1118 |
1119 void | 1119 void |
1120 end_visual_mode_keep_button() | 1120 end_visual_mode_keep_button(void) |
1121 { | 1121 { |
1122 #ifdef FEAT_CLIPBOARD | 1122 #ifdef FEAT_CLIPBOARD |
1123 // If we are using the clipboard, then remember what was selected in case | 1123 // If we are using the clipboard, then remember what was selected in case |
1124 // we need to paste it somewhere while we still own the selection. | 1124 // we need to paste it somewhere while we still own the selection. |
1125 // Only do this when the clipboard is already owned. Don't want to grab | 1125 // Only do this when the clipboard is already owned. Don't want to grab |
3188 // The Ex command failed, do not execute the operator. | 3188 // The Ex command failed, do not execute the operator. |
3189 clearop(cap->oap); | 3189 clearop(cap->oap); |
3190 else if (cap->oap->op_type != OP_NOP | 3190 else if (cap->oap->op_type != OP_NOP |
3191 && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count | 3191 && (cap->oap->start.lnum > curbuf->b_ml.ml_line_count |
3192 || cap->oap->start.col > | 3192 || cap->oap->start.col > |
3193 (colnr_T)STRLEN(ml_get(cap->oap->start.lnum)) | 3193 (colnr_T)STRLEN(ml_get(cap->oap->start.lnum)) |
3194 || did_emsg | 3194 || did_emsg |
3195 )) | 3195 )) |
3196 // The start of the operator has become invalid by the Ex command. | 3196 // The start of the operator has become invalid by the Ex command. |
3197 clearopbeep(cap->oap); | 3197 clearopbeep(cap->oap); |
3198 } | 3198 } |