输入vi指令 输入内容始终会少一行 #4872
Unanswered
yueshangyueshang
asked this question in
Q&A
Replies: 1 comment 3 replies
-
试试cat .显示什么. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
哈喽,如果可以帮我看看,输入vi a.txt的时候,少了一行,aaa不见了
const initTerm = () => {
const terminal = new Terminal({
rendererType: 'canvas', //渲染类型
rows: rows.value, //行数
// cols: cols.value, // 设置之后会输入多行之后覆盖现象
convertEol: false, //启用时,光标将设置为下一行的开头
fontSize: 14, //字体大小
disableStdin: false, //是否应禁用输入。
cursorStyle: 'block', //光标样式
// cursorBlink: true, //光标闪烁
scrollback: 30, //终端中的回滚量
tabStopWidth: 4,
theme: {
foreground: 'white', //字体
background: '#060101', //背景色
cursor: 'help' //设置光标
}
});
const attachAddon = new AttachAddon(socket.value);
const fitAddon = new FitAddon();
terminal.loadAddon(attachAddon);
terminal.loadAddon(fitAddon);
terminal.open(terminalRef.value);
terminal.focus();
//限制和后端交互,只有输入回车键才显示结果
terminal.prompt = () => {
terminal.write('\r\n$ ');
};
terminal.prompt();
不知道从哪前端入手还是后端
Beta Was this translation helpful? Give feedback.
All reactions