fix bug: can not max window. add eletric-pair mode