mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-11 04:38:24 -06:00
Don't end the current mark, if we get one of the same kind (#16107)
If you're already in the "output" state, then an app requesting an
"output" mark probably shouldn't end the current mark and start a new
one. It should just keep on keepin' on.
The decision to end the previous one was arbitrary in the first place,
so let's arbitrarily change it back.
Especially noticable if you hit <kbd>Enter</kbd> during a command,
because the auto-mark prompt work will do a CommandEnd, so long-running
commands will get broken into multiple marks 🥲
This commit is contained in:
parent
af8e20c3b6
commit
0144cdd7bc
@ -341,6 +341,13 @@ void Terminal::MarkCommandStart()
|
||||
//
|
||||
//We can just do the work below safely.
|
||||
}
|
||||
else if (_currentPromptState == PromptState::Command)
|
||||
{
|
||||
// We're already in the command state. We don't want to end the current
|
||||
// mark. We don't want to make a new one. We want to just leave the
|
||||
// current command going.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If there was no last mark, or we're in a weird state,
|
||||
@ -369,6 +376,13 @@ void Terminal::MarkOutputStart()
|
||||
//
|
||||
//We can just do the work below safely.
|
||||
}
|
||||
else if (_currentPromptState == PromptState::Output)
|
||||
{
|
||||
// We're already in the output state. We don't want to end the current
|
||||
// mark. We don't want to make a new one. We want to just leave the
|
||||
// current output going.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If there was no last mark, or we're in a weird state,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user