Fix bad cursor position because of padding on codemirror"