Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong filename in titlebar after launch #3684

Open
techee opened this issue Nov 13, 2023 · 5 comments · May be fixed by #3870
Open

Wrong filename in titlebar after launch #3684

techee opened this issue Nov 13, 2023 · 5 comments · May be fixed by #3870
Labels
Milestone

Comments

@techee
Copy link
Member

techee commented Nov 13, 2023

After Geany launch a filename not corresponding to the current file is shown in the title bar - see the screenshot below. It gets fixed as active document changes. I'm wondering if something similar to #3609 should be also done for the titlebar.

Screenshot 2023-11-13 at 10 58 18
@techee
Copy link
Member Author

techee commented Nov 22, 2023

Note that his happens when the first tab is selected after opening a session - apparently "document-open" signal isn't invoked in this case. This is a problem for the LSP plugin too: techee/geany-lsp#30.

@techee
Copy link
Member Author

techee commented Nov 22, 2023

apparently "document-open" signal isn't invoked in this case

Sorry, I meant "document-activate".

@techee
Copy link
Member Author

techee commented Dec 1, 2023

There's one more problem, the MRU file list isn't updated either when the first tab is selected after Geany start so when you switch to another tab and want to go back, the first tab's document isn't in the MRU list.

@techee techee added this to the 2.1 milestone Apr 28, 2024
@techee
Copy link
Member Author

techee commented Apr 28, 2024

I've bisected this to #3267. The original code contained the switch_to_session_page() function which emitted the switch-page signal even in the case when the right tab was already selected (so no real switch happened) which then lead to correct "document-activate" emission from on_notebook1_switch_page_after().

@techee
Copy link
Member Author

techee commented May 5, 2024

Another victim of this problem is the git-changebar plugin (and possibly others) that expects that "document-activate" is delivered also when a single tab is open. The result is that when no document is open and you open some document with changes against the committed state, git-changebar doesn't show the changes.

techee added a commit to techee/geany that referenced this issue May 11, 2024
…ches

PR geany#3267 removed the special handling
of the situation when no tab change happens after setting an active
document after session load. This happens in the situation where

1. There's just a single document
2. Depending on the tab opening logic, the active tab saved into the session
   file corresponds to the already active tab

This patch tries to restore the previous behavior where switch-page" was
synthetically emitted in such situations.

Fixes geany#3684.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant