Fix a bug of numbering lines of shell-mode.