[all-commits] [llvm/llvm-project] 7f6306: [lldb] Apply pending terminal resize before repain...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Thu Jun 18 16:25:02 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7f63067356cc142588248bbbce9577f58583cac0
https://github.com/llvm/llvm-project/commit/7f63067356cc142588248bbbce9577f58583cac0
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)
Changed paths:
M lldb/include/lldb/Host/Editline.h
M lldb/source/Host/common/Editline.cpp
M lldb/unittests/Editline/EditlineTest.cpp
Log Message:
-----------
[lldb] Apply pending terminal resize before repainting the prompt (#203045)
Editline defers ApplyTerminalSizeChange() (el_resize plus refreshing the
cached terminal dimensions) to its read loop on the main thread, but
Refresh() and PrintAsync() repaint the prompt synchronously from the
resize notification on the signal thread, ahead of that apply. The
repaint therefore used the dimensions cached before the resize. Apply
any pending resize first via a shared helper. The output stream lock
already serializes these paths, and it is a no-op when nothing is
pending.
Editline keeps querying its own size (el_resize/EL_GETTC) rather than
using the dimensions the driver reports: el_resize must update libedit's
internal line-wrapping model regardless (libedit exposes no way to set
it), and editline's cursor arithmetic must use the same width libedit
wraps at. EL_GETTC reads back exactly that value, so the two cannot
diverge, while sourcing the width from the driver's separate ioctl
could.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list