diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-08 10:39:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-08 10:39:12 +0400 |
commit | 2dba2e72b76ba2933d6ca7d3e79ad669c430e3a5 (patch) | |
tree | 19e2d2af6a5923952d29151d5ae43a69b11508e4 /source/blender/editors/space_text/text_ops.c | |
parent | 3fbd63c52e25344f115b5cd67a218436bc4007cf (diff) |
Code Cleanup: de-duplicate text pasting which only used the first line
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 5 |
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; |