jesseduffield.lazygit/docs-master/keybindings
Stefan Haller f0a997705a Copy the selected diff line(s) from the focused main view
`ctrl+o` in the focused main view copies the selection to the clipboard,
mirroring the staging view's copy. Unlike stage / discard, copying is the same
for every diff panel — it just reads the text shown — so it's a direct
MainViewController command rather than a FocusedMainViewActions method. That
keeps it free of per-panel duplication and lets it work over panels that have
no actions, notably the reflog.

The +/- prefix handling is metadata-aware where it matters: with no pager the
main view shows the raw diff, so a homogeneous selection has its +/-/space
column stripped (dropDiffPrefix) to ease pasting into code. With a pager
configured the rendered lines carry no such column, so stripping a leading
character would eat real content — copy verbatim instead. (Refining the raw
case to classify header lines via the diff-line metadata, fixing the
'--- a/file' edge case noted in 159bbb0825, is left for later.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-08 12:59:00 +02:00
..
Custom_Keybindings.md Convert keybinding fields to Keybinding 2026-05-25 15:32:47 +02:00
Keybindings_en.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_ja.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_ko.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_nl.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_pl.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_pt.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_ru.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_zh-CN.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00
Keybindings_zh-TW.md Copy the selected diff line(s) from the focused main view 2026-08-08 12:59:00 +02:00