comparison src/testing.c @ 31825:0d27ddce621d v9.0.1245

patch 9.0.1245: code is indented more than necessary Commit: https://github.com/vim/vim/commit/032713f8299abd92fcfb1e490d1ae5c1ecadde41 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Jan 25 21:05:38 2023 +0000 patch 9.0.1245: code is indented more than necessary Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11879)
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Jan 2023 22:15:03 +0100
parents b9a4699d6a35
children 04d9dff67d99
comparison
equal deleted inserted replaced
31824:086864270b73 31825:0d27ddce621d
53 if (clen > 1) 53 if (clen > 1)
54 { 54 {
55 mch_memmove(buf, p, clen); 55 mch_memmove(buf, p, clen);
56 buf[clen] = NUL; 56 buf[clen] = NUL;
57 ga_concat(gap, buf); 57 ga_concat(gap, buf);
58 } 58 return;
59 else switch (*p) 59 }
60
61 switch (*p)
60 { 62 {
61 case BS: ga_concat(gap, (char_u *)"\\b"); break; 63 case BS: ga_concat(gap, (char_u *)"\\b"); break;
62 case ESC: ga_concat(gap, (char_u *)"\\e"); break; 64 case ESC: ga_concat(gap, (char_u *)"\\e"); break;
63 case FF: ga_concat(gap, (char_u *)"\\f"); break; 65 case FF: ga_concat(gap, (char_u *)"\\f"); break;
64 case NL: ga_concat(gap, (char_u *)"\\n"); break; 66 case NL: ga_concat(gap, (char_u *)"\\n"); break;