Skip to content

Commit 14993db

Browse files
authored
Fix overeager pre-delayed-EOL wrapping in AdaptDispatch (#18899)
AdaptDispatch has a TODO item indicating that we should *not* consider a row wrapped until we write into the cell beyond it. We actually do have that logic (it even refers to it!), but we still set the wrap flag when we fill the final column. We never removed it because it broke the old VT rendering-based ConPTY implementation. Now that VtEngine is gone, so can be this code and this strange workaround for a problem nobody was quite sure what was. This will fix, hopefully, the last of our exact line length write wrap issues. tmux users can finally rejoice. Closes #8976 Closes #15602
1 parent 696dac2 commit 14993db

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/terminal/adapter/adaptDispatch.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,6 @@ void AdaptDispatch::_WriteToBuffer(const std::wstring_view string)
160160
}
161161
const auto textPositionAfter = state.text.data();
162162

163-
// TODO: A row should not be marked as wrapped just because we wrote the last column.
164-
// It should be marked whenever we write _past_ it (above, _DoLineFeed call). See GH#15602.
165-
if (wrapAtEOL && state.columnEnd >= state.columnLimit)
166-
{
167-
textBuffer.SetWrapForced(cursorPosition.y, true);
168-
}
169-
170163
if (state.columnBeginDirty != state.columnEndDirty)
171164
{
172165
const til::rect changedRect{ state.columnBeginDirty, cursorPosition.y, state.columnEndDirty, cursorPosition.y + 1 };

0 commit comments

Comments
 (0)