Fix #2171

Signed-off-by: John Rayes <live627@gmail.com>
Fix #1952

Signed-off-by: John Rayes <live627@gmail.com>
Integrate samclarke/SCEditor#308

Signed-off-by: John Rayes <live627@gmail.com>
Fix third issue mentioned in #2169

Signed-off-by: John Rayes <live627@gmail.com>