Skip to content

Commit c3cb4cd

Browse files
committed
editor: Fix line numbers jumping around when 10+ lines
1 parent a941af7 commit c3cb4cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

builtin-programs/editor.folk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ When /view/ is an editor with /...anything/ &\
320320
set lineCount [- [llength [split $code "\n"]] $vpY]
321321
set lineNumbers [$utils lineNumberView $vpY $lineCount]
322322
Wish to draw text onto $view with \
323-
position [vec2 sub $margin [list 0.005 0.0]] text $lineNumbers \
324-
scale $textScale anchor topright font NeomatrixCode
323+
position [vec2 sub $margin [list [* $em 1.8] 0.0]] \
324+
text $lineNumbers \
325+
scale $textScale anchor topleft font NeomatrixCode
325326

326327
set text [$utils applyTextViewport $code $vpX $vpY $vpWidth $vpHeight]
327328
set pos $margin

0 commit comments

Comments
 (0)