mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-03-28 18:54:40 +02:00
When switching to a different repo, and then back to the original one, searching would no longer work. The reason is that our contexts set callbacks on their views; when switching to a different repo we instantiate a new set of contexts, so they will overwrite the views' callbacks with their new ones, but when switching back to the original repo, we reuse the old contexts because they are still in memory, but they won't set their callbacks again since they only do this on construction. To fix this, replace the view-local callbacks with a global one on the gui that takes the view as an argument, so that the callback can look up the associated context dynamically.