aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-03-02 02:33:36 +0100
committerGitHub <noreply@github.com>2019-03-02 02:33:36 +0100
commited4132d7e9a7a3bda21c35119ce221146493e986 (patch)
tree898591a424f3ea3fd91e0adac6d19c881c258e64 /src/nvim/message.c
parent708176aea18e236b7ebc96a3f51dae22b366cc12 (diff)
downloadrneovim-ed4132d7e9a7a3bda21c35119ce221146493e986.tar.gz
rneovim-ed4132d7e9a7a3bda21c35119ce221146493e986.tar.bz2
rneovim-ed4132d7e9a7a3bda21c35119ce221146493e986.zip
cleanup: remove legacy `enc_dbcs` global #9660
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index b22508c23f..9a0a3565ea 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -281,15 +281,9 @@ msg_strtrunc (
/* Use up to 'showcmd' column. */
room = (int)(Rows - msg_row - 1) * Columns + sc_col - 1;
if (len > room && room > 0) {
- if (enc_utf8)
- /* may have up to 18 bytes per cell (6 per char, up to two
- * composing chars) */
- len = (room + 2) * 18;
- else if (enc_dbcs == DBCS_JPNU)
- /* may have up to 2 bytes per cell for euc-jp */
- len = (room + 2) * 2;
- else
- len = room + 2;
+ // may have up to 18 bytes per cell (6 per char, up to two
+ // composing chars)
+ len = (room + 2) * 18;
buf = xmalloc(len);
trunc_string(s, buf, room, len);
}