[geany/geany-plugins] c7c956: geanyminiscript: Drop use of the most obvious deprecated Geany API

Colomban Wendling git-noreply at xxxxx
Thu Jun 9 09:47:58 UTC 2016


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 21 Feb 2016 00:21:29 UTC
Commit:      c7c95609ab7b6d58058b002e9114adb1c3a2b5e2
             https://github.com/geany/geany-plugins/commit/c7c95609ab7b6d58058b002e9114adb1c3a2b5e2

Log Message:
-----------
geanyminiscript: Drop use of the most obvious deprecated Geany API


Modified Paths:
--------------
    geanyminiscript/src/gms.c

Modified: geanyminiscript/src/gms.c
6 lines changed, 1 insertions(+), 5 deletions(-)
===================================================================
@@ -69,14 +69,10 @@ static gchar        *gms_command = NULL ;
  */
 static void create_selection_2_input_file( ScintillaObject *sci )
 {
-    gchar  *contents = NULL;
-    gint    size_buf = sci_get_selected_text_length(sci);
+    gchar *contents = sci_get_selection_contents(sci);
 
-    contents = GMS_G_MALLOC( gchar, size_buf + 1  ) ;
     GMS_PNULL(contents) ;
 
-    sci_get_selected_text( sci ,contents  );
-
     g_file_set_contents(gms_get_in_filename(gms_hnd), contents, -1 , NULL );
     GMS_G_FREE(contents);
 }



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


More information about the Plugins-Commits mailing list