diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-04 19:28:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-04 19:28:19 +0300 |
commit | 849ce60a3284988fd7888450f34bda9c22a0d0cf (patch) | |
tree | b99dbd120491be6a0392db601c2e7108650d9da5 /source/blender/editors/space_text/text_ops.c | |
parent | 4925581820db4c0ddfe6e2fb818e4834509dfca0 (diff) |
Fix #25923: Active area of text editor line numbers too big
Area with width 60px was used for determing should we jump to line or
input new cahacter. Reduce this area to actual line numbers margin width.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 7eb0ab67d8e..efb0b173559 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2576,10 +2576,12 @@ static int line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *even static int jump_to= 0; static double last_jump= 0; + text_update_character_width(st); + if(!st->showlinenrs) return OPERATOR_PASS_THROUGH; - if(!(mval[0]>2 && mval[0]<60 && mval[1]>2 && mval[1]<ar->winy-2)) + if(!(mval[0]>2 && mval[0]<(TXT_OFFSET + TEXTXLOC) && mval[1]>2 && mval[1]<ar->winy-2)) return OPERATOR_PASS_THROUGH; if(!(event->ascii>='0' && event->ascii<='9')) |