no-mistakes(document): document rebindable InsertNewline chords; fix rustfmt and changelog link

This commit is contained in:
l0ng-ai
2026-07-29 00:37:43 +08:00
parent b745a71e60
commit 6843ff3f9c
4 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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> 提交整个缓冲区
## 窗口
+5 -1
View File
@@ -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
View File
@@ -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"
);
}