Calculate the actual moving length of cursor

Do not use magic number. Actually we can calculate the real text length accurately by (message.length + prompt.rl.line.length).