jesseduffield.lazygit/pkg
Stefan Haller af147d49f7 Lock the view while reading viewLines on mouse move
onMouseMove (and findHyperlinkAt, which it calls) read v.viewLines without
holding writeMutex, unlike every other reader. They run on the event-handling
goroutine, so a re-render on the task goroutine can shrink or rebuild viewLines
between onMouseMove's bounds check and findHyperlinkAt's indexing, causing an
out-of-range panic (observed: "index out of range [60] with length 0" while
hovering during a diff re-render).

Take writeMutex for the duration, like the other viewLines readers do, so the
check and the access see the same slice. Pre-existing, but the off-screen
re-render rebuilds viewLines on the task goroutine more often, widening the window.
2026-08-08 12:58:59 +02:00
..
app Recognize a repo that has no work tree instead of bailing out 2026-08-08 11:15:01 +02:00
cheatsheet Render every key for a binding in the cheatsheet 2026-05-25 15:18:18 +02:00
commands Recover diff-line identity by parsing the buffer, behind a swappable seam 2026-08-08 12:58:59 +02:00
common Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
config Replace gui.showSelectionInFocusedMainView config with on-demand selection 2026-08-08 12:58:59 +02:00
constants Adapt links 2026-07-31 08:42:51 +02:00
env Remember how to get back to a repo we entered a submodule from 2026-08-08 11:15:01 +02:00
fakes Modernize all codes 2025-11-15 10:46:23 +01:00
gocui Lock the view while reading viewLines on mouse move 2026-08-08 12:58:59 +02:00
gui Return to the focused main view when escaping the staged half too 2026-08-08 12:58:59 +02:00
i18n Replace gui.showSelectionInFocusedMainView config with on-demand selection 2026-08-08 12:58:59 +02:00
integration Honor the conflict-marker-size gitattribute 2026-08-08 12:43:42 +02:00
jsonschema Fold legacy quit-alt1 into the multi-key quit binding 2026-05-25 15:32:47 +02:00
logs Fix Windows linter errors 2026-06-16 16:21:13 +02:00
snake Enable intrange linter, and fix warnings 2025-06-30 18:30:11 +02:00
tasks Restore the focused main view by patch identity on escape 2026-08-08 12:58:59 +02:00
theme Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
updates Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
utils Make StringStack generic 2026-08-08 11:15:01 +02:00