We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca3402b commit 7e6289fCopy full SHA for 7e6289f
1 file changed
presentation/src/main/java/org/cryptomator/presentation/ui/fragment/TextEditorFragment.kt
@@ -146,8 +146,8 @@ class TextEditorFragment : BaseFragment<FragmentTextEditorBinding>(FragmentTextE
146
val scroll = binding.textViewWrapper
147
val layout = editor.layout ?: return
148
val line = layout.getLineForOffset(editor.selectionEnd)
149
- val lineTop = layout.getLineTop(line)
150
- val lineBottom = layout.getLineBottom(line)
+ val lineTop = editor.paddingTop + layout.getLineTop(line)
+ val lineBottom = editor.paddingTop + layout.getLineBottom(line)
151
val visibleHeight = scroll.height - scroll.paddingTop - scroll.paddingBottom
152
when {
153
lineTop < scroll.scrollY -> scroll.smoothScrollTo(0, lineTop)
0 commit comments