mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
*: Comment intentional fallthroughs
Falling through a switch case should be commented so it's clear that behavior is intentional.
This commit is contained in:
@@ -9596,13 +9596,15 @@ static void f_getcwd(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
if (from) {
|
||||
break;
|
||||
}
|
||||
case kCdScopeTab: // FALLTHROUGH
|
||||
// fallthrough
|
||||
case kCdScopeTab:
|
||||
assert(tp);
|
||||
from = tp->tp_localdir;
|
||||
if (from) {
|
||||
break;
|
||||
}
|
||||
case kCdScopeGlobal: // FALLTHROUGH
|
||||
// fallthrough
|
||||
case kCdScopeGlobal:
|
||||
if (globaldir) { // `globaldir` is not always set.
|
||||
from = globaldir;
|
||||
} else if (os_dirname(cwd, MAXPATHL) == FAIL) { // Get the OS CWD.
|
||||
|
Reference in New Issue
Block a user