microsoft/Terminal

`Pane::_FindFocusAndNeighbor` can probably be simpler

Open

#10,748 创建于 2021年7月21日

在 GitHub 查看
 (0 评论) (1 反应) (0 负责人)C++ (3,212 fork)batch import
Area-CodeHealthHelp WantedIssue-TaskProduct-Terminal

仓库指标

Star
 (35,764 star)
PR 合并指标
 (平均合并 27天 19小时) (30 天内合并 24 个 PR)

描述

If we view this problem from the point of the focused pane, what this function (and the other) do is basically:

  • move to the parent node
  • check if the other child node - the one the focused pane doesn't belong to - is in the direction we want to move the pane to
    • if yes: swap panes
    • if no: continue with the parent node

Is that correct? If my understanding is correct, I believe we can simplify this code after it has been merged.

Originally posted by @lhecker in https://github.com/microsoft/terminal/pull/10638#discussion_r674151375

贡献者指南