How to make a Text scroll alongside the Text of an InputField?

I am currenlty making a little coding game and want to have some text to the left of my inputfield to show the current line - like in a real editor. The inputfield is Multi Line Newline and once the code written in it exc!eeds it’s boundarys, the line text should scroll with it. How could I pull that of?

My (simplified) hierachy:
147666-2019-10-19-10-43-01-unity-2018410f1-personal-mainu.png

How my UI looks:

The solution was to use a TextMeshPro InputField instead. Here’s how I found out about it.