Conversation
There was a problem hiding this comment.
Since it doesn't use linesInView inside the forEach, I could just calculate the new scrollTop and editorHeight and call _getLinesInView(textHeight, scrollTop, editorHeight); just once after this for each.
There was a problem hiding this comment.
Thanks for explanation. I did try to understand the logic here and did verify and test scrolling with several inline editors and watched the cursor moving to next line when the previous line is moving out of view.
There was a problem hiding this comment.
Hehe, wasn't trying to explain it, but mentioning that the calculations here could be simplified. The idea of this for each is to remove the height of the inline editors from the scroll position and the editor height. After that is done I can just divide the left over scroll and height by the text height and get the correct first and last line in view.
There was a problem hiding this comment.
Sorry, I misunderstand you. Please create another pull request.
|
Looks good and all the integration tests for ViewCommandHandlers pass. Merging. |
Remove the use of the viewport hack
|
Oh, I was going to submit a fix for the issue I mentioned... new PR I guess. |
Since #3115 is now fixed, I removed the use of the viewport hack used to properly calculate the height of the editor. This also fixes scroll adjustment when changing the font, which was using the viewport hack and stopped working when #3115 was fixed.