Skip to content
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

Set the default for autoMarkPrompts to true #17761

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

zadjii-msft
Copy link
Member

As we discussed in bug bash.

There's really no downside to us enabling it by default (and leaving showMarksOnScrollbar: false). It'll mark lines as "prompts" when the user hits enter. This will have a couple good side effects:

  • When folks have right-aligned prompts (like, from oh-my-posh), the enter will terminate where shell integration thinks the command is, so that the right-prompt doesn't end up in the commandline history
  • the scrollToMark actions will Just Work without any other shell integration

Closes #17632

As we discussed in bug bash.

There's really no downside to us enabling it by default (and leaving showMarksOnScrollbar: false).
It'll mark lines as "prompts" when the user hits enter. This will have a couple good side effects:
* When folks have right-aligned prompts (like, from oh-my-posh), the `enter`
  will terminate where shell integration thinks the command is, so that the
  right-prompt doesn't end up in the commandline history
* the scrollToMark actions will Just Work without any other shell integration

Closes #17632
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-Suggestions Anything related to tasks or the suggestions UI (sxnui) Product-Terminal The new Windows Terminal. labels Aug 21, 2024
@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Aug 21, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Second It's a PR that needs another sign-off label Aug 21, 2024
@DHowett DHowett merged commit fd1b1c3 into main Aug 21, 2024
20 checks passed
@DHowett DHowett deleted the dev/migrie/b/17632-automark-prompts branch August 21, 2024 22:07
zadjii-msft added a commit that referenced this pull request Aug 23, 2024
I guess I didn't realize that `SendCharEvent` could get called before `Create`.
In that scenario, `enter` would hit the automark codepath (due to #17761), then
crash because there was no text buffer.

Pretty easy to prevent.

Closes #17776
carlos-zamora pushed a commit that referenced this pull request Aug 23, 2024
I guess I didn't realize that `SendCharEvent` could get called before `Create`. In that scenario, `enter` would hit the automark codepath (due to #17761), then crash because there was no text buffer.

Pretty easy to prevent.

Closes #17776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Suggestions Anything related to tasks or the suggestions UI (sxnui) Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn autoMarkPrompts on by default in 1.22
3 participants