* fix: the file browser's right-click menu opens outside the window near the lower or right edge
A right click on the empty part of the Files list opened its menu down and to the right of the pointer whatever space was left, so near the lower edge of the window most of its entries were out of reach and near the right edge it was cut off. The menu now opens upwards when there is no room below the pointer and to the left when there is no room to its right, so all of it stays inside the window.
Fixes#34097
* fix: the file browser's right-click menu opens outside the window near the lower or right edge
Writes the menu placement the same way the Ask about this file box already does.
* feat: outline of a Markdown file's headings in the terminal file preview
Long Markdown files in a terminal's Files preview could only be navigated by scrolling, which gets slow in a report with hundreds of sections. The preview toolbar now has an Outline button that lists the document's headings, indented by level, and picking one with the mouse or keyboard jumps straight to that section. The button shows only for Markdown files that have headings, and not in the Source view.
* feat: show the Outline button on every Markdown file
The Outline button in a terminal's Files preview only appeared when the file had headings, and the check that decided this missed some headings and counted front matter as one. It now shows on every Markdown file outside the Source view, and for a file without headings the list shows "No results".
* Leave the English catalog out of the outline change
* Keep the English catalog as it is on the base
Picking a different terminal for a chat left the open Files tab showing the previous terminal's folder and files, while the chat itself was set to the new terminal. Seeing the new terminal's files meant opening Files again from the + menu. The Files tab now moves to the newly picked terminal and shows its files, as the file browser did in 0.12. With a terminal set to Per chat, the tab shows that chat's own files once the first message creates the chat.
Fixes#33951