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:
authorIan Thompson <quornian@googlemail.com>2008-07-28 15:54:13 +0400
committerIan Thompson <quornian@googlemail.com>2008-07-28 15:54:13 +0400
commit12f0fb1a42b54c5053a8cd0b0937ef1054283094 (patch)
treee1810ac1feb4c17996f6164bb5edc4f2ac0278cb /source/blender/src/drawtext.c
parentf45aca0447e09c5c36bba31f5de48d6554cdc4f9 (diff)
Draw cursor at the leading edge of selection (as in other apps.) and hide cursor swapping from the user.
Diffstat (limited to 'source/blender/src/drawtext.c')
-rw-r--r--source/blender/src/drawtext.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c
index 02656c8d440..07c9b960e61 100644
--- a/source/blender/src/drawtext.c
+++ b/source/blender/src/drawtext.c
@@ -695,17 +695,17 @@ static void draw_cursor(SpaceText *st) {
}
- /* Draw the cursor itself */
- x= text_draw(st, text->curl->line, st->left, text->curc, 0, 0, 0, NULL);
+ /* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */
+ x= text_draw(st, text->sell->line, st->left, text->selc, 0, 0, 0, NULL);
if (x) {
offl= offc= 0;
- if (st->wordwrap) wrap_offset(st, text->curl, text->curc, &offl, &offc);
+ if (st->wordwrap) wrap_offset(st, text->sell, text->selc, &offl, &offc);
x += offc*spacetext_get_fontwidth(st);
- h= txt_get_span(text->lines.first, text->curl) - st->top + offl;
+ h= txt_get_span(text->lines.first, text->sell) - st->top + offl;
if (st->overwrite) {
- ch[0]= (unsigned char) text->curl->line[text->curc];
+ ch[0]= (unsigned char) text->sell->line[text->selc];
if (ch[0]=='\0') ch[0]=' ';
ch[1]= '\0';
w= BMF_GetStringWidth(spacetext_get_font(st), ch);