jesseduffield.lazygit/pkg
Stefan Haller 159bbb0825 Strip the '+' and '-' characters when copying parts of a diff to the clipboard
This makes it easier to copy diff hunks and paste them into code. We only strip
the prefixes if the copied lines are either all '+' or all '-' (possibly
including context lines), otherwise we keep them. We also keep them when parts
of a hunk header is included in the selection; this is useful for copying a diff
hunk and pasting it into a github comment, for example.

A not-quite-correct edge case is when you select the '--- a/file.txt' line of a
diff header on its own; in this case we copy it as '-- a/file.txt' (same for the
'+++' line). This is probably uncommon enough that it's not worth fixing (it's
not trivial to fix because we don't know that we're in a header).
2025-04-29 11:33:47 +02:00
..
app Remove unused cherry-picking code in daemon 2025-04-20 15:59:48 +02:00
cheatsheet Update to go 1.24 2025-03-08 14:53:54 -05:00
commands Fix nvim-remote commands for fish shell 2025-04-27 20:12:11 +02:00
common Make common.UserConfig an atomic.Pointer for safe concurrent access 2024-08-18 10:24:52 +02:00
config Fix nvim-remote commands for fish shell 2025-04-27 20:12:11 +02:00
constants Make the links in the status panel point to the current version rather than master 2024-03-22 08:13:59 +01:00
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes cleanup integration test code 2023-02-26 12:54:13 +11:00
gui Strip the '+' and '-' characters when copying parts of a diff to the clipboard 2025-04-29 11:33:47 +02:00
i18n Disallow creating custom patches when the diff context size is 0 2025-04-29 10:21:18 +02:00
integration Remove space after rebase todo 2025-04-29 11:30:37 +02:00
jsonschema Remove deprecated configs from auto generated config.md 2025-03-23 12:44:24 +01:00
logs Remove secureexec package 2023-07-30 19:59:51 +10:00
snake integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
tasks Fix race condition when starting several command tasks in quick succession 2025-04-27 10:48:43 +02:00
theme Highlight inactive selection in bold 2024-06-23 14:43:13 +02:00
updates Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
utils Remove utils.Clamp, use lo.Clamp instead 2025-04-21 18:03:18 +02:00