Improve code for unsaved tab titles (#32770)

Just fixing a couple of minor things that bugged when revisiting this
code.

Release Notes:

- N/A
61771e7e4aJoseph T. Lyons committed on 6/15/2025, 9:18:09 PM· committed by GitHubparentfd7a133
1 file changedLine totals unavailable