Fix inverted cells, make sure inverted cells are cleared correctly (#996)
Fix inverted cells, make sure inverted cells are cleared correctly (#996)

* Corretly inverse foreground and background. Be more conservative when clearing

* add missing space

* Re-enable optimisation with better checks

* Fix insversed check

xtermjs/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,akalipetis/xterm.js,akalipetis/xterm.js,xtermjs/xterm.js,akalipetis/xterm.js,akalipetis/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js