diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-14 13:42:10 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-14 13:42:10 -0500 |
commit | ec6afbf4e621bfcfde903d15744dc0c61f80097d (patch) | |
tree | 94fd08577b5eed003b6f7eb3a7bcafcac7f20a66 /src/nvim/screen.c | |
parent | 64a32d55c59188f1e922ca438fdb2d65caa06665 (diff) | |
parent | 0bc40e660c0a74776ace86ad5e393755523c3803 (diff) | |
download | rneovim-ec6afbf4e621bfcfde903d15744dc0c61f80097d.tar.gz rneovim-ec6afbf4e621bfcfde903d15744dc0c61f80097d.tar.bz2 rneovim-ec6afbf4e621bfcfde903d15744dc0c61f80097d.zip |
Merge pull request #1661 from philix/early_exit
Reduce indentation level by early returning or continuing loop
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 9e21676b2a..0148979335 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4283,7 +4283,7 @@ static int comp_char_differs(int off_from, int off_to) */ static int char_needs_redraw(int off_from, int off_to, int cols) { - if (cols > 0 + return (cols > 0 && ((ScreenLines[off_from] != ScreenLines[off_to] || ScreenAttrs[off_from] != ScreenAttrs[off_to]) @@ -4299,10 +4299,7 @@ static int char_needs_redraw(int off_from, int off_to, int cols) && comp_char_differs(off_from, off_to)) || ((*mb_off2cells)(off_from, off_from + cols) > 1 && ScreenLines[off_from + 1] - != ScreenLines[off_to + 1]))) - )) - return TRUE; - return FALSE; + != ScreenLines[off_to + 1]))))); } /* |