From 984557301975191cfe3006e7aca33639349ac2b8 Mon Sep 17 00:00:00 2001
From: Daniel Carl <danielcarl@gmx.de>
Date: Sat, 19 Oct 2013 16:45:06 +0200
Subject: [PATCH] Use SHOWCMD_LEN to be the number of chars without NULL byte.

---
 src/normal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/normal.c b/src/normal.c
index 788f351..26e4dc5 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -206,7 +206,7 @@ static struct {
 
 extern VbCore vb;
 
-static char showcmd_buf[SHOWCMD_LEN];   /* buffer to show ambiguous key sequence */
+static char showcmd_buf[SHOWCMD_LEN + 1];   /* buffer to show ambiguous key sequence */
 
 /**
  * Function called when vimb enters the normal mode.
@@ -290,7 +290,7 @@ void normal_showcmd(int c)
         translated = transchar(c);
         old        = strlen(showcmd_buf);
         extra      = strlen(translated);
-        overflow   = old + extra - SHOWCMD_LEN + 1;
+        overflow   = old + extra - SHOWCMD_LEN;
         if (overflow > 0) {
             g_memmove(showcmd_buf, showcmd_buf + overflow, old - overflow + 1);
         }
-- 
2.20.1