aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSander Bosma <sanderbosma@gmail.com>2017-02-19 21:08:14 +0100
committerSander Bosma <sanderbosma@gmail.com>2017-02-20 20:06:38 +0100
commit192fd161f985d43e7432824665ae6caeb532808c (patch)
treef625fe4f0085ec8e82e44b4775d4b10bfbc671b6 /src
parentddd8f7d333645169d94bdf8a0ec551a40620a19e (diff)
downloadrneovim-192fd161f985d43e7432824665ae6caeb532808c.tar.gz
rneovim-192fd161f985d43e7432824665ae6caeb532808c.tar.bz2
rneovim-192fd161f985d43e7432824665ae6caeb532808c.zip
hardcopy.c: fix dead assignment
`has_mbyte` is deprecated (globals.h), so `outputlen` is always assigned within the if statement. Therefore, the previous initialization is unnecessary.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/hardcopy.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index c2dc6231f1..19d97ecfef 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -845,12 +845,10 @@ static colnr_T hardcopy_line(prt_settings_T *psettings, int page_line, prt_pos_T
* Loop over the columns until the end of the file line or right margin.
*/
for (col = ppos->column; line[col] != NUL && !need_break; col += outputlen) {
- outputlen = 1;
- if (has_mbyte && (outputlen = (*mb_ptr2len)(line + col)) < 1)
+ if ((outputlen = (*mb_ptr2len)(line + col)) < 1) {
outputlen = 1;
- /*
- * syntax highlighting stuff.
- */
+ }
+ // syntax highlighting stuff.
if (psettings->do_syntax) {
id = syn_get_id(curwin, ppos->file_line, col, 1, NULL, FALSE);
if (id > 0)