[geany/geany] 7215c5: Merge pull request #646 from b4n/new-cl-files-once

Colomban Wendling git-noreply at xxxxx
Tue Oct 13 20:35:16 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 13 Oct 2015 20:35:16 UTC
Commit:      7215c5027711546cbe899fe4ccf828bd945c1d66
             https://github.com/geany/geany/commit/7215c5027711546cbe899fe4ccf828bd945c1d66

Log Message:
-----------
Merge pull request #646 from b4n/new-cl-files-once

Don't open more than one document for non-existing paths from the CLI


Modified Paths:
--------------
    src/libmain.c

Modified: src/libmain.c
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -804,7 +804,11 @@ gboolean main_handle_filename(const gchar *locale_filename)
 	{	/* create new file with the given filename */
 		gchar *utf8_filename = utils_get_utf8_from_locale(filename);
 
-		doc = document_new_file(utf8_filename, NULL, NULL);
+		doc = document_find_by_filename(utf8_filename);
+		if (doc)
+			document_show_tab(doc);
+		else
+			doc = document_new_file(utf8_filename, NULL, NULL);
 		if (doc != NULL)
 			ui_add_recent_document(doc);
 		g_free(utf8_filename);



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list