Fix cursor style in selection
(cherry picked from commit 4de8a48)
Fix ConcurrentModificationException while drawing cursor
(cherry picked from commit 739306d)
Revert unneeded newArrayList() use
(cherry picked from commit 381bf75)
Fix NPE
(cherry picked from commit a959d07)
Fix LinesBuffer growing indefinitely
(cherry picked from commit 853a809)