fix for console selection when pasting.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Oct 2010 12:16:03 +0000 (12:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Oct 2010 12:16:03 +0000 (12:16 +0000)
source/blender/editors/space_console/console_ops.c

index 3f04d0e4293390403486b76bbfb87731ff35ab38..4e50b589bc60f0b7d8b7a5f7f6d0bdd22da48d37 100644 (file)
@@ -782,6 +782,7 @@ void CONSOLE_OT_copy(wmOperatorType *ot)
 
 static int paste_exec(bContext *C, wmOperator *op)
 {
+       SpaceConsole *sc= CTX_wm_space_console(C);
        ConsoleLine *ci= console_history_verify(C);
 
        char *buf_str= WM_clipboard_text_get(0);
@@ -805,7 +806,7 @@ static int paste_exec(bContext *C, wmOperator *op)
                        ci= console_history_verify(C);
                }
 
-               console_line_insert(ci, buf_next);
+               console_select_offset(sc, console_line_insert(ci, buf_next));
        }
 
        MEM_freeN(buf_str);