jesseduffield.lazygit/pkg
Stefan Haller f6eaed8cd4 Snapshot the view width for command-task rendering on the UI thread
A command task streams its output into a view from its own goroutine. To
track soft-wraps (so cursor-positioning escapes from a pager land on the
right line) the write path read the view's live InnerWidth, and the pty
setup read its InnerSize -- both off the UI thread, racing the UI thread
mutating the view's dimensions during layout.

Capture the width on the UI thread instead and hand it to the task: the
escape interpreter keeps a screenColMax it reads from, seeded in NewView
and refreshed per render via View.SetContentWidth (called from
newCmdTask/newPtyTask before the task's goroutine starts), and the pty
size is computed in the after-layout callback rather than in the task's
start func. The view's dimensions stay UI-thread-only; the task uses the
snapshot rather than reading them live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 12:35:54 +02:00
..
app Allow overriding the platform used for default keybindings 2026-07-03 19:08:22 +02:00
cheatsheet Render every key for a binding in the cheatsheet 2026-05-25 15:18:18 +02:00
commands Wait for the streamed command's output goroutine before reading its buffers 2026-07-17 12:19:14 +02:00
common Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
config Add gui.shrinkSidePanelsToContent option 2026-07-03 19:25:01 +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 Modernize all codes 2025-11-15 10:46:23 +01:00
gocui Snapshot the view width for command-task rendering on the UI thread 2026-07-17 12:35:54 +02:00
gui Snapshot the view width for command-task rendering on the UI thread 2026-07-17 12:35:54 +02:00
i18n Show a waiting status while creating a branch 2026-07-17 12:32:32 +02:00
integration Don't show a transient view whose window is not part of the layout 2026-07-17 12:07:24 +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 Make the ViewBufferManager throttle flag atomic 2026-07-17 12:35:54 +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 Expand a leading ~ in worktree paths to the home directory 2026-07-03 18:53:05 +02:00