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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-24 19:43:42 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-24 19:43:42 +0400
commit68249f4ed641c832c250b69c586b63d620080f22 (patch)
tree7a80c4103325a38199db70d06920dfb1ca9c8d24 /source/blender/editors/space_text
parenteab6d5bf722e4345f147877b154fc061021e3873 (diff)
Patch #31641: Text editor: unindent even if no selection
Patch by Sebastian Nell, thanks! Still not ideal (it could some smarter selection policy in such case perhaps), but it's less annoying than it was before.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index f9911fdddbf..6bb4c2987fb 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -970,21 +970,17 @@ static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text = CTX_data_edit_text(C);
- if (txt_has_sel(text)) {
- text_drawcache_tag_update(CTX_wm_space_text(C), 0);
-
- txt_order_cursors(text);
- txt_unindent(text);
+ text_drawcache_tag_update(CTX_wm_space_text(C), 0);
- text_update_edited(text);
+ txt_order_cursors(text);
+ txt_unindent(text);
- text_update_cursor_moved(C);
- WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
+ text_update_edited(text);
- return OPERATOR_FINISHED;
- }
+ text_update_cursor_moved(C);
+ WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
- return OPERATOR_CANCELLED;
+ return OPERATOR_FINISHED;
}
void TEXT_OT_unindent(wmOperatorType *ot)