@b4n commented on this pull request.
> @@ -950,6 +1005,23 @@ gwh_browser_set_uri (GwhBrowser *self, g_free (real_uri); } +gboolean +gwh_browser_set_uri_from_document (GwhBrowser *self, + GeanyDocument *doc) +{ + gchar *uri; + + /* document must exist on disk */ + if (! doc || ! doc->real_path) + return FALSE; + + uri = g_strconcat ("file://", doc->file_name, NULL); No, `doc->real_path` is used to verify the document is actually saved to a file, but it's in locale encoding, whereas `doc->file_name` is the expected UTF-8. Admittedly, it might not behave properly if the locale is non-UTF-8 and the file path contains non-ASCII characters; but at least the worse that would happen would be the file not being found. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1295#discussion_r1581062630 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany-plugins/pull/1295/review/2025096...@github.com>