mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-21 16:02:20 +00:00
no-mistakes(document): document rebindable InsertNewline chords; fix rustfmt and changelog link
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@
|
||||
- **Fuzzy history search** — <kbd>⌃ R</kbd> shows what you ran, where, and whether it failed; turn it off (Settings → Terminal → Keyboard, or `history_search` in `config.json`) and <kbd>⌃ R</kbd> goes to your shell instead, so an fzf / percol binding keeps working
|
||||
- **History from day one** — your existing shell history works as-is and carries across sessions
|
||||
- **Line editing** — click to place the caret, mouse selection, word motion, undo
|
||||
- **Multi-line editing** — wrapped and multi-line commands edit in place; the grid shifts to keep the caret visible
|
||||
- **Multi-line editing** — wrapped and multi-line commands edit in place; the grid shifts to keep the caret visible. <kbd>⇧ ⏎</kbd> · <kbd>⌥ ⏎</kbd> insert a newline instead of submitting (rebindable as `InsertNewline`); a plain <kbd>⏎</kbd> submits the whole buffer
|
||||
|
||||
## In the window
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
- **模糊历史搜索** —— <kbd>⌃ R</kbd> 看到每条命令在哪跑的、什么时候、有没有失败;关掉它(设置 → 终端 → 键盘,或 `config.json` 里的 `history_search`)后 <kbd>⌃ R</kbd> 直接交给 shell,你绑的 fzf / percol 照常可用
|
||||
- **历史开箱即用** —— 你已有的 shell 历史直接生效,并跨会话延续
|
||||
- **行编辑** —— 点击定位光标、鼠标选区、词级移动、撤销
|
||||
- **多行编辑** —— 折行和多行命令原地编辑;网格自动上移,光标始终可见
|
||||
- **多行编辑** —— 折行和多行命令原地编辑;网格自动上移,光标始终可见。<kbd>⇧ ⏎</kbd> · <kbd>⌥ ⏎</kbd> 插入换行而不提交(可改绑,动作名 `InsertNewline`),单独按 <kbd>⏎</kbd> 提交整个缓冲区
|
||||
|
||||
## 窗口
|
||||
|
||||
|
||||
@@ -8781,7 +8781,11 @@ mod gpui_tests {
|
||||
vcx.simulate_keystrokes("shift-enter");
|
||||
window
|
||||
.update(cx, |view, _, _| {
|
||||
assert_eq!(view.cmd.text(), "echo a\n\n\n", "the chord survives a rebind");
|
||||
assert_eq!(
|
||||
view.cmd.text(),
|
||||
"echo a\n\n\n",
|
||||
"the chord survives a rebind"
|
||||
);
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
+1
-3
@@ -850,9 +850,7 @@ mod tests {
|
||||
assert!(keystroke_is_valid(key), "{key} does not parse");
|
||||
assert!(make_binding("InsertNewline", key).is_some());
|
||||
assert!(
|
||||
bound_keystrokes(&effective)
|
||||
.iter()
|
||||
.any(|(k, _)| k == key),
|
||||
bound_keystrokes(&effective).iter().any(|(k, _)| k == key),
|
||||
"{key} is not remembered as installed"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user