Extracted common code from branches.
Extracted common code from branches.

R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone,R1dO/scintilla_clone