diff options
author | Yichao Zhou <broken.zhoug@gmail.com> | 2016-05-14 00:24:41 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-20 04:04:48 -0400 |
commit | 391d8ff3d8d2edfe56f7d14baddec7ddc38466ae (patch) | |
tree | 4ee9f333aa98e5d3bcfcf0ef77c3fe4af7e0b415 | |
parent | 9dc08dd692ed97290fc5c8ebcb20438616b891b8 (diff) | |
download | rneovim-391d8ff3d8d2edfe56f7d14baddec7ddc38466ae.tar.gz rneovim-391d8ff3d8d2edfe56f7d14baddec7ddc38466ae.tar.bz2 rneovim-391d8ff3d8d2edfe56f7d14baddec7ddc38466ae.zip |
lint
-rw-r--r-- | src/nvim/screen.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index a1f74279ce..7d358ab7b6 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3404,7 +3404,7 @@ win_line ( c = lcs_trail; n_attr = 1; extra_attr = hl_attr(HLF_8); - saved_attr2 = char_attr; /* save current attr */ + saved_attr2 = char_attr; // save current attr mb_c = c; if (enc_utf8 && (*mb_char2len)(c) > 1) { mb_utf8 = TRUE; @@ -3552,7 +3552,7 @@ win_line ( c = ' '; } lcs_eol_one = -1; - --ptr; /* put it back at the NUL */ + ptr--; // put it back at the NUL extra_attr = hl_attr(HLF_AT); n_attr = 1; mb_c = c; @@ -3585,8 +3585,8 @@ win_line ( } n_attr = n_extra + 1; extra_attr = hl_attr(HLF_8); - saved_attr2 = char_attr; /* save current attr */ - mb_utf8 = FALSE; /* don't draw as UTF-8 */ + saved_attr2 = char_attr; // save current attr + mb_utf8 = false; // don't draw as UTF-8 } else if (VIsual_active && (VIsual_mode == Ctrl_V || VIsual_mode == 'v') @@ -3696,9 +3696,10 @@ win_line ( did_wcol = true; } - /* Don't override visual selection highlighting. */ - if (n_attr > 0 && draw_state == WL_LINE) + // Don't override visual selection highlighting. + if (n_attr > 0 && draw_state == WL_LINE) { char_attr = hl_combine_attr(char_attr, extra_attr); + } /* * Handle the case where we are in column 0 but not on the first @@ -3726,13 +3727,12 @@ win_line ( mb_utf8 = TRUE; u8cc[0] = 0; c = 0xc0; - } else - mb_utf8 = FALSE; /* don't draw as UTF-8 */ - if (!attr_pri) { - saved_attr3 = char_attr; /* save current attr */ - char_attr = hl_attr(HLF_AT); /* later copied to char_attr */ - n_attr3 = 1; + } else { + mb_utf8 = false; // don't draw as UTF-8 } + saved_attr3 = char_attr; // save current attr + char_attr = hl_attr(HLF_AT); // later copied to char_attr + n_attr3 = 1; } /* |