context_menu: Use `when` instead of if-block (#24566)

See
https://github.com/zed-industries/zed/pull/24562#issuecomment-2648343416
. Should have just added that to my original comment btw - sorry!

CC @danilo-leal 

Release Notes:

- N/A
0fd2203665Finn Evers committed on 2/10/2025, 7:47:09 PM· committed by GitHubparent72e1947
1 file changedLine totals unavailable