-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace MarkKind::None with MarkKind::Output #18291
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3221,7 +3221,7 @@ void TextBuffer::ClearMarksInRange( | |
row.SetScrollbarData(std::nullopt); | ||
for (auto& [attr, length] : runs) | ||
{ | ||
attr.SetMarkAttributes(MarkKind::None); | ||
attr.SetMarkAttributes(MarkKind::Output); | ||
} | ||
} | ||
} | ||
|
@@ -3246,7 +3246,6 @@ MarkExtents TextBuffer::_scrollMarkExtentForRow(const til::CoordType rowOffset, | |
bool startedPrompt = false; | ||
bool startedCommand = false; | ||
bool startedOutput = false; | ||
MarkKind lastMarkKind = MarkKind::Output; | ||
|
||
const auto endThisMark = [&](auto x, auto y) { | ||
if (startedOutput) | ||
|
@@ -3280,7 +3279,7 @@ MarkExtents TextBuffer::_scrollMarkExtentForRow(const til::CoordType rowOffset, | |
const auto nextX = gsl::narrow_cast<uint16_t>(x + length); | ||
const auto markKind{ attr.GetMarkAttributes() }; | ||
|
||
if (markKind != MarkKind::None) | ||
if (markKind != MarkKind::Output) | ||
{ | ||
lastMarkedText = { nextX, y }; | ||
|
||
|
@@ -3316,8 +3315,6 @@ MarkExtents TextBuffer::_scrollMarkExtentForRow(const til::CoordType rowOffset, | |
|
||
endThisMark(lastMarkedText.x, lastMarkedText.y); | ||
} | ||
// Otherwise, we've changed from any state -> any state, and it doesn't really matter. | ||
lastMarkKind = markKind; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CC @zadjii-msft in case he has any thoughts here |
||
} | ||
// advance to next run of text | ||
x = nextX; | ||
|
@@ -3510,7 +3507,7 @@ bool TextBuffer::StartOutput() | |
// the exit code on that row's scroll mark. | ||
void TextBuffer::EndCurrentCommand(std::optional<unsigned int> error) | ||
{ | ||
_currentAttributes.SetMarkAttributes(MarkKind::None); | ||
_currentAttributes.SetMarkAttributes(MarkKind::Output); | ||
|
||
for (auto y = GetCursor().GetPosition().y; y >= 0; y--) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know, entirely removing this conditional seems to work, form 1 minute of playing with it