*: Comment intentional fallthroughs

Falling through a switch case should be commented so it's clear that
behavior is intentional.
This commit is contained in:
James McCoy
2017-04-20 01:17:42 -04:00
parent d840ff7b70
commit 0ff959329b
6 changed files with 12 additions and 2 deletions

View File

@@ -4916,13 +4916,16 @@ static unsigned quote_meta(char_u *dest, char_u *src, int len)
if (ctrl_x_mode == CTRL_X_DICTIONARY
|| ctrl_x_mode == CTRL_X_THESAURUS)
break;
// fallthrough
case '~':
if (!p_magic) /* quote these only if magic is set */
break;
// fallthrough
case '\\':
if (ctrl_x_mode == CTRL_X_DICTIONARY
|| ctrl_x_mode == CTRL_X_THESAURUS)
break;
// fallthrough
case '^': /* currently it's not needed. */
case '$':
m++;