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>2013-02-14 07:03:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-14 07:03:12 +0400
commitab7ca2dc441239686bcc44189c79e377ba4d089c (patch)
tree21d2ff9ffcb561e420c47ade3450394c93713320 /source/blender/editors/space_text
parent12f6d3ad906924ff8a2bbae7eadae3e28ab62d83 (diff)
fix for double clicking in the text editor not working usefully (double clicking a pair chars would select 3 - one to the left).
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 1f209f90007..b60528bcee8 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1312,9 +1312,11 @@ void TEXT_OT_select_line(wmOperatorType *ot)
static int text_select_word_exec(bContext *C, wmOperator *UNUSED(op))
{
Text *text = CTX_data_edit_text(C);
+ /* don't advance cursor before stepping */
+ const bool use_init_step = false;
- txt_jump_left(text, 0);
- txt_jump_right(text, 1);
+ txt_jump_left(text, false, use_init_step);
+ txt_jump_right(text, true, use_init_step);
text_update_cursor_moved(C);
WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text);
@@ -1816,11 +1818,11 @@ static int text_move_cursor(bContext *C, int type, int select)
break;
case PREV_WORD:
- txt_jump_left(text, select);
+ txt_jump_left(text, select, true);
break;
case NEXT_WORD:
- txt_jump_right(text, select);
+ txt_jump_right(text, select, true);
break;
case PREV_CHAR: