microsoft/Terminal

`Pane::_FindFocusAndNeighbor` can probably be simpler

Open

#10.748 geöffnet am 21. Juli 2021

Auf GitHub ansehen
 (0 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (3.212 Forks)batch import
Area-CodeHealthHelp WantedIssue-TaskProduct-Terminal

Repository-Metriken

Stars
 (35.764 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 27T 19h) (24 gemergte PRs in 30 T)

Beschreibung

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

Contributor Guide