diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-14 07:03:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-14 07:03:12 +0400 |
commit | ab7ca2dc441239686bcc44189c79e377ba4d089c (patch) | |
tree | 21d2ff9ffcb561e420c47ade3450394c93713320 /source/blender/blenkernel/intern | |
parent | 12f6d3ad906924ff8a2bbae7eadae3e28ab62d83 (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/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 3be9097ce82..86e7a152a4a 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -38,12 +38,12 @@ #include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BLI_path_util.h" #include "BLI_string.h" #include "BLI_string_cursor_utf8.h" #include "BLI_string_utf8.h" #include "BLI_listbase.h" -#include "BLI_utildefines.h" #include "BLI_fileops.h" #include "DNA_constraint_types.h" @@ -936,7 +936,7 @@ void txt_move_right(Text *text, short sel) if (!sel) txt_pop_sel(text); } -void txt_jump_left(Text *text, short sel) +void txt_jump_left(Text *text, bool sel, bool use_init_step) { TextLine **linep; int *charp; @@ -948,12 +948,12 @@ void txt_jump_left(Text *text, short sel) BLI_str_cursor_step_utf8((*linep)->line, (*linep)->len, charp, STRCUR_DIR_PREV, - STRCUR_JUMP_DELIM); + STRCUR_JUMP_DELIM, use_init_step); if (!sel) txt_pop_sel(text); } -void txt_jump_right(Text *text, short sel) +void txt_jump_right(Text *text, bool sel, bool use_init_step) { TextLine **linep; int *charp; @@ -965,7 +965,7 @@ void txt_jump_right(Text *text, short sel) BLI_str_cursor_step_utf8((*linep)->line, (*linep)->len, charp, STRCUR_DIR_NEXT, - STRCUR_JUMP_DELIM); + STRCUR_JUMP_DELIM, use_init_step); if (!sel) txt_pop_sel(text); } @@ -2402,7 +2402,7 @@ void txt_delete_char(Text *text) void txt_delete_word(Text *text) { - txt_jump_right(text, 1); + txt_jump_right(text, true, true); txt_delete_sel(text); } @@ -2451,7 +2451,7 @@ void txt_backspace_char(Text *text) void txt_backspace_word(Text *text) { - txt_jump_left(text, 1); + txt_jump_left(text, true, true); txt_delete_sel(text); } |