#title=""
#tooltip="Sum",1033,"合計",1041,"Součet",1029,"Summe",1031,"Somme",1036,"Suma",3082,"Suma",2058,"Somma",1040,"합계",1042,"Som",1043,"Сумма",1049,"合计",2052,"加總",1028
#icon="sum.ico"
// Do not edit this file.  If you want to edit the file, please copy it into another folder.
// This file will be replaced with a newer version every time EmEditor is upgraded.
if( !document.selection.IsEmpty ) {
	var a = document.selection.Text.split("\n");
	var sum = 0;
	if( a.length > 1 ) {  // must be multiple lines
		for( var i = 0; i < a.length; i++ ){
			sum += Number(a[i]);
		}
		bOrgCombine = CombineHistory;
		CombineHistory = true;
		document.selection.CharRight();
		document.selection.NewLine();
		document.selection.Text = sum;
		CombineHistory = bOrgCombine;
	}
}
