Added the management of the selected line to the sidebare controller.