The part of that scene that always confused me was when Kirk left the bridge, and Decker tells Ilia "I don't think the Captain meant anything personal." What is he talking about? All I remember Kirk saying to her more or less is that he had the utmost confidence in her.
The novelization clarifies that Kirk had instantly regretted adding, "And in you too, Lieutenant"
, in response to Decker's comment that Kirk had "the utmost confidence" in him. Kirk was irritated by Decker's words, and they were both trying to deflect Ilia from asking outright why Decker was no longer captain.