[geany/geany-plugins] 859cce: geanyctags: simplify text selection retrieval
Jiří Techet
git-noreply at xxxxx
Tue Oct 14 21:48:33 UTC 2014
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Tue, 14 Oct 2014 21:48:33 UTC
Commit: 859cce697fc1f8a3ec21fbe85a7dc1ebe8eb6d14
https://github.com/geany/geany-plugins/commit/859cce697fc1f8a3ec21fbe85a7dc1ebe8eb6d14
Log Message:
-----------
geanyctags: simplify text selection retrieval
Modified Paths:
--------------
geanyctags/src/geanyctags.c
Modified: geanyctags/src/geanyctags.c
7 lines changed, 1 insertions(+), 6 deletions(-)
===================================================================
@@ -292,12 +292,7 @@ static gchar *get_selection()
editor = doc->editor;
if (sci_has_selection(editor->sci))
- {
- gint len = sci_get_selected_text_length(editor->sci);
-
- ret = g_malloc(len + 1);
- sci_get_selected_text(editor->sci, ret);
- }
+ ret = sci_get_selection_contents(editor->sci);
else
ret = editor_get_word_at_pos(editor, -1, GEANY_WORDCHARS);
--------------
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