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>2018-06-04 10:31:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
commit44505b38df557a5711703613685a1dec9fc2c3d9 (patch)
tree3f05bebcc7bfadf56569f2dcca7f95fc56b1b0d0 /source/blender/editors/space_console
parent6654e109df952be3a3128fae2508a02c196ae593 (diff)
Cleanup: strip trailing space in editors
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/console_draw.c12
-rw-r--r--source/blender/editors/space_console/console_ops.c98
-rw-r--r--source/blender/editors/space_console/space_console.c76
3 files changed, 93 insertions, 93 deletions
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index 6396b390ca0..6ee658b744c 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -73,7 +73,7 @@ void console_scrollback_prompt_begin(struct SpaceConsole *sc, ConsoleLine *cl_du
/* fake the edit line being in the scroll buffer */
ConsoleLine *cl = sc->history.last;
int prompt_len = strlen(sc->prompt);
-
+
cl_dummy->type = CONSOLE_LINE_INPUT;
cl_dummy->len = prompt_len + cl->len;
cl_dummy->len_alloc = cl_dummy->len + 1;
@@ -82,7 +82,7 @@ void console_scrollback_prompt_begin(struct SpaceConsole *sc, ConsoleLine *cl_du
memcpy(cl_dummy->line + prompt_len, cl->line, cl->len + 1);
BLI_addtail(&sc->scrollback, cl_dummy);
}
-void console_scrollback_prompt_end(struct SpaceConsole *sc, ConsoleLine *cl_dummy)
+void console_scrollback_prompt_end(struct SpaceConsole *sc, ConsoleLine *cl_dummy)
{
MEM_freeN(cl_dummy->line);
BLI_remlink(&sc->scrollback, cl_dummy);
@@ -97,10 +97,10 @@ static int console_textview_begin(TextViewContext *tvc)
tvc->lheight = sc->lheight * UI_DPI_FAC;
tvc->sel_start = sc->sel_start;
tvc->sel_end = sc->sel_end;
-
+
/* iterator */
tvc->iter = sc->scrollback.last;
-
+
return (tvc->iter != NULL);
}
@@ -108,7 +108,7 @@ static void console_textview_end(TextViewContext *tvc)
{
SpaceConsole *sc = (SpaceConsole *)tvc->arg1;
(void)sc;
-
+
}
static int console_textview_step(TextViewContext *tvc)
@@ -193,7 +193,7 @@ static int console_textview_main__internal(struct SpaceConsole *sc, ARegion *ar,
{
ConsoleLine cl_dummy = {NULL};
int ret = 0;
-
+
View2D *v2d = &ar->v2d;
TextViewContext tvc = {0};
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index b740ff4b397..4867d42030c 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -92,9 +92,9 @@ void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl)
static void console_scrollback_limit(SpaceConsole *sc)
{
int tot;
-
+
if (U.scrollback < 32) U.scrollback = 256; // XXX - save in user defaults
-
+
for (tot = BLI_listbase_count(&sc->scrollback); tot > U.scrollback; tot--)
console_scrollback_free(sc, sc->scrollback.first);
}
@@ -122,16 +122,16 @@ static bool console_line_cursor_set(ConsoleLine *cl, int cursor)
if (cursor < 0) cursor_new = 0;
else if (cursor > cl->len) cursor_new = cl->len;
else cursor_new = cursor;
-
+
if (cursor_new == cl->cursor) {
return false;
}
-
+
cl->cursor = cursor_new;
return true;
}
-#if 0 // XXX unused
+#if 0 // XXX unused
static void console_lb_debug__internal(ListBase *lb)
{
ConsoleLine *cl;
@@ -147,7 +147,7 @@ static void console_history_debug(const bContext *C)
{
SpaceConsole *sc = CTX_wm_space_console(C);
-
+
console_lb_debug__internal(&sc->history);
}
#endif
@@ -155,7 +155,7 @@ static void console_history_debug(const bContext *C)
static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
{
ConsoleLine *ci = MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
-
+
if (from) {
BLI_assert(strlen(from->line) == from->len);
ci->line = BLI_strdupn(from->line, from->len);
@@ -168,7 +168,7 @@ static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
ci->len_alloc = 64;
ci->len = 0;
}
-
+
BLI_addtail(lb, ci);
return ci;
}
@@ -182,7 +182,7 @@ static ConsoleLine *console_history_add(SpaceConsole *sc, ConsoleLine *from)
static ConsoleLine *console_scrollback_add(const bContext *C, ConsoleLine *from)
{
SpaceConsole *sc = CTX_wm_space_console(C);
-
+
return console_lb_add__internal(&sc->scrollback, from);
}
#endif
@@ -192,9 +192,9 @@ static ConsoleLine *console_lb_add_str__internal(ListBase *lb, char *str, bool o
ConsoleLine *ci = MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add");
if (own) ci->line = str;
else ci->line = BLI_strdup(str);
-
+
ci->len = ci->len_alloc = strlen(str);
-
+
BLI_addtail(lb, ci);
return ci;
}
@@ -215,7 +215,7 @@ ConsoleLine *console_history_verify(const bContext *C)
ConsoleLine *ci = sc->history.last;
if (ci == NULL)
ci = console_history_add(sc, NULL);
-
+
return ci;
}
@@ -233,7 +233,7 @@ static void console_line_verify_length(ConsoleLine *ci, int len)
char *new_line = MEM_callocN(new_len, "console line");
memcpy(new_line, ci->line, ci->len);
MEM_freeN(ci->line);
-
+
ci->line = new_line;
ci->len_alloc = new_len;
}
@@ -242,7 +242,7 @@ static void console_line_verify_length(ConsoleLine *ci, int len)
static int console_line_insert(ConsoleLine *ci, char *str)
{
int len = strlen(str);
-
+
if (len > 0 && str[len - 1] == '\n') { /* stop new lines being pasted at the end of lines */
str[len - 1] = '\0';
len--;
@@ -250,15 +250,15 @@ static int console_line_insert(ConsoleLine *ci, char *str)
if (len == 0)
return 0;
-
+
console_line_verify_length(ci, len + ci->len);
-
+
memmove(ci->line + ci->cursor + len, ci->line + ci->cursor, (ci->len - ci->cursor) + 1);
memcpy(ci->line + ci->cursor, str, len);
-
+
ci->len += len;
ci->cursor += len;
-
+
return len;
}
@@ -312,11 +312,11 @@ static const EnumPropertyItem console_move_type_items[] = {
static int console_move_exec(bContext *C, wmOperator *op)
{
ConsoleLine *ci = console_history_verify(C);
-
+
int type = RNA_enum_get(op->ptr, "type");
bool done = false;
int pos;
-
+
switch (type) {
case LINE_BEGIN:
pos = ci->cursor;
@@ -364,7 +364,7 @@ static int console_move_exec(bContext *C, wmOperator *op)
done = console_line_cursor_set(ci, pos);
break;
}
-
+
if (done) {
ScrArea *sa = CTX_wm_area(C);
ARegion *ar = CTX_wm_region(C);
@@ -383,7 +383,7 @@ void CONSOLE_OT_move(wmOperatorType *ot)
ot->name = "Move Cursor";
ot->description = "Move cursor position";
ot->idname = "CONSOLE_OT_move";
-
+
/* api callbacks */
ot->exec = console_move_exec;
ot->poll = ED_operator_console_active;
@@ -410,9 +410,9 @@ static int console_insert_exec(bContext *C, wmOperator *op)
}
len = console_line_insert(ci, str);
-
+
MEM_freeN(str);
-
+
if (len == 0) {
return OPERATOR_CANCELLED;
}
@@ -442,7 +442,7 @@ static int console_insert_invoke(bContext *C, wmOperator *op, const wmEvent *eve
else {
char str[BLI_UTF8_MAX + 1];
size_t len;
-
+
if (event->utf8_buf[0]) {
len = BLI_str_utf8_size_safe(event->utf8_buf);
memcpy(str, event->utf8_buf, len);
@@ -466,7 +466,7 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
ot->name = "Insert";
ot->description = "Insert text at cursor position";
ot->idname = "CONSOLE_OT_insert";
-
+
/* api callbacks */
ot->exec = console_insert_exec;
ot->invoke = console_insert_invoke;
@@ -588,11 +588,11 @@ static int console_delete_exec(bContext *C, wmOperator *op)
const short type = RNA_enum_get(op->ptr, "type");
bool done = false;
-
+
if (ci->len == 0) {
return OPERATOR_CANCELLED;
}
-
+
switch (type) {
case DEL_NEXT_CHAR:
case DEL_NEXT_WORD:
@@ -640,7 +640,7 @@ static int console_delete_exec(bContext *C, wmOperator *op)
ED_area_tag_redraw(CTX_wm_area(C));
console_scroll_bottom(ar);
-
+
return OPERATOR_FINISHED;
}
@@ -651,7 +651,7 @@ void CONSOLE_OT_delete(wmOperatorType *ot)
ot->name = "Delete";
ot->description = "Delete text by cursor position";
ot->idname = "CONSOLE_OT_delete";
-
+
/* api callbacks */
ot->exec = console_delete_exec;
ot->poll = ED_operator_console_active;
@@ -700,17 +700,17 @@ static int console_clear_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc = CTX_wm_space_console(C);
ARegion *ar = CTX_wm_region(C);
-
+
const bool scrollback = RNA_boolean_get(op->ptr, "scrollback");
const bool history = RNA_boolean_get(op->ptr, "history");
-
+
/*ConsoleLine *ci = */ console_history_verify(C);
-
+
if (scrollback) { /* last item in mistory */
while (sc->scrollback.first)
console_scrollback_free(sc, sc->scrollback.first);
}
-
+
if (history) {
while (sc->history.first)
console_history_free(sc, sc->history.first);
@@ -729,11 +729,11 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
ot->name = "Clear";
ot->description = "Clear text by type";
ot->idname = "CONSOLE_OT_clear";
-
+
/* api callbacks */
ot->exec = console_clear_exec;
ot->poll = ED_operator_console_active;
-
+
/* properties */
RNA_def_boolean(ot->srna, "scrollback", 1, "Scrollback", "Clear the scrollback history");
RNA_def_boolean(ot->srna, "history", 0, "History", "Clear the command history");
@@ -778,7 +778,7 @@ static int console_history_cycle_exec(bContext *C, wmOperator *op)
console_history_add(sc, (ConsoleLine *)sc->history.last);
}
-
+
ci = sc->history.last;
console_select_offset(sc, ci->len - prev_len);
@@ -797,11 +797,11 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
ot->name = "History Cycle";
ot->description = "Cycle through history";
ot->idname = "CONSOLE_OT_history_cycle";
-
+
/* api callbacks */
ot->exec = console_history_cycle_exec;
ot->poll = ED_operator_console_active;
-
+
/* properties */
RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "Reverse cycle history");
}
@@ -852,11 +852,11 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
ot->name = "History Append";
ot->description = "Append history at cursor position";
ot->idname = "CONSOLE_OT_history_append";
-
+
/* api callbacks */
ot->exec = console_history_append_exec;
ot->poll = ED_operator_console_active;
-
+
/* properties */
RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor", 0, 10000);
@@ -870,15 +870,15 @@ static int console_scrollback_append_exec(bContext *C, wmOperator *op)
SpaceConsole *sc = CTX_wm_space_console(C);
ARegion *ar = CTX_wm_region(C);
ConsoleLine *ci;
-
+
char *str = RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */
int type = RNA_enum_get(op->ptr, "type");
console_history_verify(C);
-
+
ci = console_scrollback_add_str(sc, str, 1); /* own the string */
ci->type = type;
-
+
console_scrollback_limit(sc);
/* 'ar' can be null depending on the operator that runs
@@ -888,7 +888,7 @@ static int console_scrollback_append_exec(bContext *C, wmOperator *op)
}
ED_area_tag_redraw(CTX_wm_area(C));
-
+
return OPERATOR_FINISHED;
}
@@ -907,11 +907,11 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
ot->name = "Scrollback Append";
ot->description = "Append scrollback text by type";
ot->idname = "CONSOLE_OT_scrollback_append";
-
+
/* api callbacks */
ot->exec = console_scrollback_append_exec;
ot->poll = ED_operator_console_active;
-
+
/* properties */
RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
RNA_def_enum(ot->srna, "type", console_line_type_items, CONSOLE_LINE_OUTPUT, "Type", "Console output type");
@@ -924,7 +924,7 @@ static int console_copy_exec(bContext *C, wmOperator *UNUSED(op))
DynStr *buf_dyn;
char *buf_str;
-
+
ConsoleLine *cl;
int sel[2];
int offset = 0;
@@ -1088,7 +1088,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, const wmEven
sel_prev[0] = sc->sel_start;
sel_prev[1] = sc->sel_end;
-
+
console_cursor_set_to_pos(sc, ar, scu, mval, true);
/* only redraw if the selection changed */
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index b0d40d6fb38..2dfe02cc333 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -56,26 +56,26 @@ static SpaceLink *console_new(const bContext *UNUSED(C))
{
ARegion *ar;
SpaceConsole *sconsole;
-
+
sconsole = MEM_callocN(sizeof(SpaceConsole), "initconsole");
sconsole->spacetype = SPACE_CONSOLE;
-
+
sconsole->lheight = 14;
-
+
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for console");
-
+
BLI_addtail(&sconsole->regionbase, ar);
ar->regiontype = RGN_TYPE_HEADER;
ar->alignment = RGN_ALIGN_BOTTOM;
-
-
+
+
/* main region */
ar = MEM_callocN(sizeof(ARegion), "main region for text");
-
+
BLI_addtail(&sconsole->regionbase, ar);
ar->regiontype = RGN_TYPE_WINDOW;
-
+
/* keep in sync with info */
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
ar->v2d.align |= V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */
@@ -94,10 +94,10 @@ static SpaceLink *console_new(const bContext *UNUSED(C))
static void console_free(SpaceLink *sl)
{
SpaceConsole *sc = (SpaceConsole *) sl;
-
+
while (sc->scrollback.first)
console_scrollback_free(sc, sc->scrollback.first);
-
+
while (sc->history.first)
console_history_free(sc, sc->history.first);
}
@@ -112,13 +112,13 @@ static void console_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)
static SpaceLink *console_duplicate(SpaceLink *sl)
{
SpaceConsole *sconsolen = MEM_dupallocN(sl);
-
+
/* clear or remove stuff from old */
-
+
/* TODO - duplicate?, then we also need to duplicate the py namespace */
BLI_listbase_clear(&sconsolen->scrollback);
BLI_listbase_clear(&sconsolen->history);
-
+
return (SpaceLink *)sconsolen;
}
@@ -147,10 +147,10 @@ static void console_main_region_init(wmWindowManager *wm, ARegion *ar)
/* own keymap */
keymap = WM_keymap_find(wm->defaultconf, "Console", SPACE_CONSOLE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
-
+
/* add drop boxes */
lb = WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW);
-
+
WM_event_add_dropbox_handler(&ar->handlers, lb);
}
@@ -208,7 +208,7 @@ static void path_drop_copy(wmDrag *drag, wmDropBox *drop)
static void console_dropboxes(void)
{
ListBase *lb = WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW);
-
+
WM_dropbox_add(lb, "CONSOLE_OT_insert", id_drop_poll, id_drop_copy);
WM_dropbox_add(lb, "CONSOLE_OT_insert", path_drop_poll, path_drop_copy);
}
@@ -236,10 +236,10 @@ static void console_main_region_draw(const bContext *C, ARegion *ar)
console_history_verify(C); /* make sure we have some command line */
console_textview_main(sc, ar);
-
+
/* reset view matrix */
UI_view2d_view_restore(C);
-
+
/* scrollers */
scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_GRID_CLAMP);
UI_view2d_scrollers_draw(C, v2d, scrollers);
@@ -255,9 +255,9 @@ static void console_operatortypes(void)
WM_operatortype_append(CONSOLE_OT_indent);
WM_operatortype_append(CONSOLE_OT_unindent);
-
+
/* for use by python only */
- WM_operatortype_append(CONSOLE_OT_history_append);
+ WM_operatortype_append(CONSOLE_OT_history_append);
WM_operatortype_append(CONSOLE_OT_scrollback_append);
WM_operatortype_append(CONSOLE_OT_clear);
@@ -273,7 +273,7 @@ static void console_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap = WM_keymap_find(keyconf, "Console", SPACE_CONSOLE, 0);
wmKeyMapItem *kmi;
-
+
#ifdef __APPLE__
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_END);
@@ -281,14 +281,14 @@ static void console_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", NEXT_WORD);
-
+
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END);
-
+
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
RNA_boolean_set(kmi->ptr, "reverse", false);
-
+
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
RNA_boolean_set(kmi->ptr, "reverse", true);
@@ -296,17 +296,17 @@ static void console_keymap(struct wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
RNA_boolean_set(kmi->ptr, "reverse", false);
-
+
kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.font_size");
RNA_boolean_set(kmi->ptr, "reverse", true);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_CHAR);
-
+
RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", true);
RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", false);
-
+
#if 0
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", NEXT_WORD);
@@ -315,7 +315,7 @@ static void console_keymap(struct wmKeyConfig *keyconf)
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_PAGE);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", PAGEDOWNKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_PAGE);
#endif
-
+
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_delete", DELKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_NEXT_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_delete", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_PREV_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_delete", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", DEL_PREV_CHAR); /* same as above [#26623] */
@@ -331,7 +331,7 @@ static void console_keymap(struct wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "interactive", true);
kmi = WM_keymap_add_item(keymap, "CONSOLE_OT_execute", PADENTER, KM_PRESS, 0, 0);
RNA_boolean_set(kmi->ptr, "interactive", true);
-
+
//WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", TABKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */
WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", SPACEKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */
#endif
@@ -343,7 +343,7 @@ static void console_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CONSOLE_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "CONSOLE_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0);
#endif
-
+
WM_keymap_add_item(keymap, "CONSOLE_OT_select_set", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CONSOLE_OT_select_word", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
@@ -399,10 +399,10 @@ void ED_spacetype_console(void)
{
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype console");
ARegionType *art;
-
+
st->spaceid = SPACE_CONSOLE;
strncpy(st->name, "Console", BKE_ST_MAXNAME);
-
+
st->new = console_new;
st->free = console_free;
st->init = console_init;
@@ -410,7 +410,7 @@ void ED_spacetype_console(void)
st->operatortypes = console_operatortypes;
st->keymap = console_keymap;
st->dropboxes = console_dropboxes;
-
+
/* regions: main window */
art = MEM_callocN(sizeof(ARegionType), "spacetype console region");
art->regionid = RGN_TYPE_WINDOW;
@@ -420,20 +420,20 @@ void ED_spacetype_console(void)
art->draw = console_main_region_draw;
art->cursor = console_cursor;
art->listener = console_main_region_listener;
-
-
+
+
BLI_addhead(&st->regiontypes, art);
-
+
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype console region");
art->regionid = RGN_TYPE_HEADER;
art->prefsizey = HEADERY;
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
-
+
art->init = console_header_region_init;
art->draw = console_header_region_draw;
-
+
BLI_addhead(&st->regiontypes, art);