scroll to the current line when switching to a stack tab for the first time