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:
authorJustin Dailey <dail8859@yahoo.com>2012-11-16 05:12:01 +0400
committerJustin Dailey <dail8859@yahoo.com>2012-11-16 05:12:01 +0400
commitbe6ea8ff2c51a421536cde6f550f6f1edd71e617 (patch)
treee7bdc09a96bf3685d25f93dfdf1168f6bc8f227d /source/blender/editors/space_text/text_ops.c
parent4ece50723bf82af2dedf99f41d761827e668ad7e (diff)
fix [#33180] text editor line height issue
Added small space between lines in the text editor.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r--source/blender/editors/space_text/text_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 105e20ffadb..ae5de4c6a25 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -2202,10 +2202,10 @@ static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event)
if (!tsc->scrollbar) {
txtdelta[0] = -tsc->delta[0] / st->cwidth;
- txtdelta[1] = tsc->delta[1] / st->lheight;
+ txtdelta[1] = tsc->delta[1] / (st->lheight + TXT_LINE_SPACING);
tsc->delta[0] %= st->cwidth;
- tsc->delta[1] %= st->lheight;
+ tsc->delta[1] %= (st->lheight + TXT_LINE_SPACING);
}
else {
txtdelta[1] = -tsc->delta[1] * st->pix_per_line;
@@ -2599,7 +2599,7 @@ static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int
{
Text *text = st->text;
text_update_character_width(st);
- y = (ar->winy - 2 - y) / st->lheight;
+ y = (ar->winy - 2 - y) / (st->lheight + TXT_LINE_SPACING);
if (st->showlinenrs) x -= TXT_OFFSET + TEXTXLOC;
else x -= TXT_OFFSET;