summaryrefslogtreecommitdiff
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 9fe22a39c..60af27c55 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1957,7 +1957,7 @@ script_dump_profile(FILE *fd)
if (IObuff[IOSIZE - 2] != NUL && IObuff[IOSIZE - 2] != NL)
{
int n = IOSIZE - 2;
-# ifdef FEAT_MBYTE
+
if (enc_utf8)
{
/* Move to the first byte of this char.
@@ -1968,7 +1968,6 @@ script_dump_profile(FILE *fd)
}
else if (has_mbyte)
n -= mb_head_off(IObuff, IObuff + n);
-# endif
IObuff[n] = NL;
IObuff[n + 1] = NUL;
}
@@ -4254,9 +4253,7 @@ struct source_cookie
int dbg_tick; /* debug_tick when breakpoint was set */
int level; /* top nesting level of sourced file */
#endif
-#ifdef FEAT_MBYTE
vimconv_T conv; /* type of conversion */
-#endif
};
#ifdef FEAT_EVAL
@@ -4593,7 +4590,6 @@ do_source(
# endif
#endif
-#ifdef FEAT_MBYTE
cookie.conv.vc_type = CONV_NONE; /* no conversion */
/* Read the first line so we can check for a UTF-8 BOM. */
@@ -4612,7 +4608,6 @@ do_source(
firstline = p;
}
}
-#endif
/*
* Call do_cmdline, which will call getsourceline() to get the lines.
@@ -4683,9 +4678,7 @@ almosttheend:
fclose(cookie.fp);
vim_free(cookie.nextline);
vim_free(firstline);
-#ifdef FEAT_MBYTE
convert_setup(&cookie.conv, NULL, NULL);
-#endif
if (trigger_source_post)
apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp, FALSE, curbuf);
@@ -4924,7 +4917,6 @@ getsourceline(int c UNUSED, void *cookie, int indent UNUSED)
}
}
-#ifdef FEAT_MBYTE
if (line != NULL && sp->conv.vc_type != CONV_NONE)
{
char_u *s;
@@ -4937,7 +4929,6 @@ getsourceline(int c UNUSED, void *cookie, int indent UNUSED)
line = s;
}
}
-#endif
#ifdef FEAT_EVAL
/* Did we encounter a breakpoint? */
@@ -5194,7 +5185,6 @@ script_line_end(void)
void
ex_scriptencoding(exarg_T *eap UNUSED)
{
-#ifdef FEAT_MBYTE
struct source_cookie *sp;
char_u *name;
@@ -5219,7 +5209,6 @@ ex_scriptencoding(exarg_T *eap UNUSED)
if (name != eap->arg)
vim_free(name);
-#endif
}
#if defined(FEAT_EVAL) || defined(PROTO)