Index: source/blender/editors/space_text/space_text.c =================================================================== --- source/blender/editors/space_text/space_text.c (revision 45073) +++ source/blender/editors/space_text/space_text.c (working copy) @@ -321,7 +321,8 @@ WM_keymap_add_item(keymap, "TEXT_OT_indent", TABKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "TEXT_OT_unindent", TABKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "TEXT_OT_uncomment", DKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + WM_keymap_add_item(keymap, "TEXT_OT_uncomment", KKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + WM_keymap_add_item(keymap, "TEXT_OT_comment", KKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END); Index: source/blender/editors/space_text/text_ops.c =================================================================== --- source/blender/editors/space_text/text_ops.c (revision 45073) +++ source/blender/editors/space_text/text_ops.c (working copy) @@ -935,21 +935,17 @@ { Text *text= CTX_data_edit_text(C); - if(txt_has_sel(text)) { - text_drawcache_tag_update(CTX_wm_space_text(C), 0); + text_drawcache_tag_update(CTX_wm_space_text(C), 0); - txt_order_cursors(text); - txt_unindent(text); + txt_order_cursors(text); + txt_unindent(text); - text_update_edited(text); + text_update_edited(text); - text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + text_update_cursor_moved(C); + WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); - return OPERATOR_FINISHED; - } - - return OPERATOR_CANCELLED; + return OPERATOR_FINISHED; } void TEXT_OT_unindent(wmOperatorType *ot) @@ -1017,19 +1013,16 @@ { Text *text= CTX_data_edit_text(C); - if(txt_has_sel(text)) { - text_drawcache_tag_update(CTX_wm_space_text(C), 0); + text_drawcache_tag_update(CTX_wm_space_text(C), 0); - txt_order_cursors(text); - txt_comment(text); - text_update_edited(text); + txt_order_cursors(text); + txt_comment(text); + text_update_edited(text); - text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); - return OPERATOR_FINISHED; - } - - return OPERATOR_CANCELLED; + text_update_cursor_moved(C); + WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + + return OPERATOR_FINISHED; } void TEXT_OT_comment(wmOperatorType *ot) @@ -1050,20 +1043,16 @@ { Text *text= CTX_data_edit_text(C); - if(txt_has_sel(text)) { - text_drawcache_tag_update(CTX_wm_space_text(C), 0); + text_drawcache_tag_update(CTX_wm_space_text(C), 0); - txt_order_cursors(text); - txt_uncomment(text); - text_update_edited(text); + txt_order_cursors(text); + txt_uncomment(text); + text_update_edited(text); - text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + text_update_cursor_moved(C); + WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); - return OPERATOR_FINISHED; - } - - return OPERATOR_CANCELLED; + return OPERATOR_FINISHED; } void TEXT_OT_uncomment(wmOperatorType *ot)