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>2012-11-22 13:49:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-22 13:49:56 +0400
commit62331fd0f84425e2f7b1c3239f7fb000910dfbb6 (patch)
tree178652e3e55bced697837aacb2dbb3b2539b9f85 /source/blender/editors/space_console
parent989b5983c8286ca653d07efe94ecd030b9020524 (diff)
fix for clear line adjusting console selection.
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/console_ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index d3ae5373a18..1a9f6c177b2 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -157,10 +157,9 @@ static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
ConsoleLine *ci = MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
if (from) {
- ci->line = BLI_strdup(from->line);
- ci->len = strlen(ci->line);
- ci->len_alloc = ci->len;
-
+ BLI_assert(strlen(from->line) == from->len);
+ ci->line = BLI_strdupn(from->line, from->len);
+ ci->len = ci->len_alloc = from->len;
ci->cursor = from->cursor;
ci->type = from->type;
}
@@ -625,6 +624,7 @@ static int console_clear_line_exec(bContext *C, wmOperator *UNUSED(op))
console_history_add(C, ci);
console_history_add(C, NULL);
+ console_select_offset(sc, -ci->len);
console_textview_update_rect(sc, ar);