Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-01-08 10:39:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-08 10:39:12 +0400
commit2dba2e72b76ba2933d6ca7d3e79ad669c430e3a5 (patch)
tree19e2d2af6a5923952d29151d5ae43a69b11508e4 /source/blender/editors/space_text
parent3fbd63c52e25344f115b5cd67a218436bc4007cf (diff)
Code Cleanup: de-duplicate text pasting which only used the first line
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 2849db7330a..cd4c214e0d6 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -797,11 +797,12 @@ static char *txt_copy_selected(Text *text)
static int text_paste_exec(bContext *C, wmOperator *op)
{
+ const bool selection = RNA_boolean_get(op->ptr, "selection");
Text *text = CTX_data_edit_text(C);
char *buf;
- int selection = RNA_boolean_get(op->ptr, "selection");
+ int buf_len;
- buf = WM_clipboard_text_get(selection);
+ buf = WM_clipboard_text_get(selection, &buf_len);
if (!buf)
return OPERATOR_CANCELLED;