Skip to content

Fix a few VI key handlers to close edit group properly - #3845

Merged
Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:edit-group
Oct 24, 2023
Merged

Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:edit-group

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Oct 23, 2023 •

Copy link
Copy Markdown
Member

PR Summary

Fix #1281

I copied the code in Repalce.vi.cs from #2012 (thanks Maxime Labelle (@springcomp)!) to fix the instances where edit group was not correctly ended when searching fails. I also copied a test from #2012 and added 2 more tests.

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:

@daxian-dbw

Copy link
Copy Markdown
Member Author

Maxime Labelle (@springcomp) Can you please take a look at this PR? As called out in #2012 (review), I'd like to see if we can make the VI mode works as expected while requiring balanced edit groups. Thanks!

@springcomp

Maxime Labelle (springcomp) commented Oct 24, 2023 •

Copy link
Copy Markdown
Contributor

Dongbo Wang (@daxian-dbw) Sure please let me a bit of time for feedback and to rework the other PRs more thoroughly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This captures the spirit of my initial PR to the perfection.
Looks great to me.

Comment thread test/BasicEditingTest.VI.cs Resolved
Comment thread test/BasicEditingTest.VI.cs Resolved
@daxian-dbw

Copy link
Copy Markdown
Member Author

Maxime Labelle (@springcomp) Thanks for the feedback! I have updated the comments as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InvalidOperationException thrown when typing cffcc in command mode

2 participants