mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Add keyboard table selection to the transcript (#61422)
## What changed - Add configurable `pager.mark_markdown`, bound to the leader followed by `v`, to mark the table cell under the selection caret. - Use arrows or `hjkl` to extend a rectangular cell selection, `o` to swap corners, and `y` to copy. Press `v` to select text within the active cell without including neighboring cells, including across wrapped lines. - Show table-specific footer hints and route the marking chord in both the main transcript and transcript overlays. ## Testing Add coverage for cell rectangles, header-only selections, empty cells, wrapped text, Unicode and escaped pipes, Markdown copying, search cancellation, mouse takeover, and chord routing with remapped find and leader keys. GitOrigin-RevId: 81ed9e52092bba3c7ef064e95043d2c070df0f4c
This commit is contained in:
@@ -213,7 +213,7 @@ impl TranscriptView {
|
||||
if accepting && self.search.is_reading() {
|
||||
self.accept_search_into_select_mode(cells);
|
||||
} else if cancelling {
|
||||
self.restore_select_search_origin();
|
||||
self.restore_select_search_origin(cells);
|
||||
}
|
||||
return Some(ViewAction::Changed);
|
||||
}
|
||||
@@ -270,16 +270,24 @@ impl TranscriptView {
|
||||
| MouseEventKind::Drag(MouseButton::Left)
|
||||
| MouseEventKind::Up(MouseButton::Left)
|
||||
);
|
||||
let before = self
|
||||
.selection
|
||||
.as_ref()
|
||||
.map(|selection| (selection.start, selection.end, selection.unit()));
|
||||
let before = self.selection.as_ref().map(|selection| {
|
||||
(
|
||||
selection.start,
|
||||
selection.end,
|
||||
selection.unit(),
|
||||
selection.has_table_scope(),
|
||||
)
|
||||
});
|
||||
let action =
|
||||
self.handle_mouse_with_mode(event, cells, MouseMode::Selection(patch_approval));
|
||||
let after = self
|
||||
.selection
|
||||
.as_ref()
|
||||
.map(|selection| (selection.start, selection.end, selection.unit()));
|
||||
let after = self.selection.as_ref().map(|selection| {
|
||||
(
|
||||
selection.start,
|
||||
selection.end,
|
||||
selection.unit(),
|
||||
selection.has_table_scope(),
|
||||
)
|
||||
});
|
||||
if endpoint_changed && before != after {
|
||||
if self.has_selection_range() {
|
||||
self.disclosure.resume_after_approval = None;
|
||||
|
||||
Reference in New Issue
Block a user