c3ks/terminal.js — pull request #26 by jedi4ever (2013-05-08 10:31:13+00:00)
Title: csi.js set n,m to 0 as defaults , handle correct defaults for CSUU & DECSTBM

I think there is a structural flaw in csi.js

1) while parsing the arguments, the n and m are set to 0 because they use '+'value.
therefore all escape codes that don't specify all arguments get 0 as default.
I reverted it to without the '+' in front so the case can check if needs to apply defaults
2) DECSTBM needed term.height if no second param is specified for the scrollregion
3) CSUU set (-n || 1) , for all -n the default it probably -1 , so it should read -(n || 1)

they might be other cases that break now, I'll continue to work on those.