Skip to content

fix(resizePane): Mark as handled only when resize succeeds#20001

Merged
DHowett merged 5 commits into
microsoft:mainfrom
nmurrell07:fix-resizepane-handled-flag
May 5, 2026
Merged

fix(resizePane): Mark as handled only when resize succeeds#20001
DHowett merged 5 commits into
microsoft:mainfrom
nmurrell07:fix-resizepane-handled-flag

Conversation

@nmurrell07
Copy link
Copy Markdown
Contributor

This fix addresses issue #19983 where resizePane actions unconditionally consume keystrokes even when no resize can occur.

The fix follows the same pattern used for moveFocus and swapPane fixes:

  • Changed Tab::ResizePane to return bool indicating success
  • Changed TerminalPage::_ResizePane to return bool from ResizePane
  • Updated _HandleResizePane to set args.Handled() based on whether resize succeeded

This allows the keychord to propagate to the terminal when no resize can occur, matching the behavior of moveFocus and swapPane (GH#6129).

This fix addresses issue microsoft#19983 where resizePane actions unconditionally
consume keystrokes even when no resize can occur.

The fix follows the same pattern used for moveFocus and swapPane fixes:
- Changed Tab::ResizePane to return bool indicating success
- Changed TerminalPage::_ResizePane to return bool from ResizePane
- Updated _HandleResizePane to set args.Handled() based on whether resize succeeded

This allows the keychord to propagate to the terminal when no resize can occur,
matching the behavior of moveFocus and swapPane (GH#6129).
@DHowett
Copy link
Copy Markdown
Member

DHowett commented Mar 20, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

looks good - thanks! merge will be blocked until you agree to the CLA of course.

@DHowett DHowett enabled auto-merge (squash) March 20, 2026 21:35
@nmurrell07
Copy link
Copy Markdown
Contributor Author

nmurrell07 commented Mar 21, 2026

@microsoft-github-policy-service agree

Comment on lines +2800 to 2801
return tabImpl->ResizePane(direction);
}
Copy link
Copy Markdown
Member

@carlos-zamora carlos-zamora Mar 23, 2026

Choose a reason for hiding this comment

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

Suggested change
return tabImpl->ResizePane(direction);
}
return tabImpl->ResizePane(direction);
}
return false;

CI pipeline is failing because this warning is treated as an error:

##[warning]src\cascadia\TerminalApp\TerminalPage.cpp(2802,0): Warning C4715: 'winrt::TerminalApp::implementation::TerminalPage::_ResizePane': not all control paths return a value

Simple fix. 😊

@DHowett
Copy link
Copy Markdown
Member

DHowett commented Mar 23, 2026

code format failed too -- suggesting the wrong line endings (perhaps on behalf of whatever tool was used to author this code)

@DHowett
Copy link
Copy Markdown
Member

DHowett commented May 5, 2026

/azp run

@DHowett DHowett disabled auto-merge May 5, 2026 19:09
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Sorry for the delay!

@DHowett DHowett merged commit dadde2f into microsoft:main May 5, 2026
14 of 16 checks passed
Qmoony pushed a commit to Qmoony/terminal that referenced this pull request May 11, 2026
…#20001)

This fix addresses issue microsoft#19983 where resizePane actions unconditionally
consume keystrokes even when no resize can occur.

The fix follows the same pattern used for moveFocus and swapPane fixes:
- Changed Tab::ResizePane to return bool indicating success
- Changed TerminalPage::_ResizePane to return bool from ResizePane  
- Updated _HandleResizePane to set args.Handled() based on whether
resize succeeded

This allows the keychord to propagate to the terminal when no resize can
occur, matching the behavior of moveFocus and swapPane (microsoft#6129).

Closes microsoft#19983

---------

Co-authored-by: nmurrell07 <nmurrell07@users.noreply.github.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.24 Servicing Pipeline May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Cherry Picked
Status: To Cherry Pick

Development

Successfully merging this pull request may close these issues.

3 participants