#29762
Yutaka Emura
キーマスター

nory 様

いつもお世話になっております。

さきほど公開した v20.6.1 と v20.6.904 では、マクロ開始時にマウス カーソルがビジーにならないようにしました。また、最終行末や先頭行頭に移動した時点でカーソルの水平位置がリセットされないように、マクロを改良しました。お試しください。

LineDown.jsee

y = document.selection.GetActivePointY(eePosLogical);
x = document.selection.GetActivePointX(eePosLogical);
if( x == 1 && y == 1 ) {
	x = editor.GetProfileInt( eeRegEmEditorUsers, "test", "SaveX", 0 );
	editor.WriteProfileInt( eeRegEmEditorUsers, "test", "SaveX", 0 );
	if( x > 1 ) {
		document.selection.SetActivePoint(eePosLogical, x, y );
		Quit();
	}
}
document.selection.LineDown(false,1);
if( y == document.selection.GetActivePointY(eePosLogical) ) {
	x = document.selection.GetActivePointX(eePosLogical);
	nLastLineLen = document.GetLine( y ).length;
	if( x != nLastLineLen + 1 ) {
		document.selection.EndOfLine(false,eeLineLogical);
		editor.WriteProfileInt( eeRegEmEditorUsers, "test", "SaveX", x );
	}
}

LineUp.jsee

y = document.selection.GetActivePointY(eePosLogical);
x = document.selection.GetActivePointX(eePosLogical);
yLines = document.GetLines();
if( y == yLines ) {
	nLastLineLen = document.GetLine( y ).length;
	if( x == nLastLineLen + 1 ) {
		x = editor.GetProfileInt( eeRegEmEditorUsers, "test", "SaveX", 0 );
		editor.WriteProfileInt( eeRegEmEditorUsers, "test", "SaveX", 0 );
		if( x >= 1 ) {
			document.selection.SetActivePoint(eePosLogical, x, y );
			Quit();
		}
	}
}
document.selection.LineUp(false,1);
if( y == document.selection.GetActivePointY(eePosLogical) ) {
	x = document.selection.GetActivePointX(eePosLogical);
	if( x != 1 ) {
		document.selection.StartOfLine(false,eeLineLogical);
		editor.WriteProfileInt( eeRegEmEditorUsers, "test", "SaveX", x );
	}
}

よろしくお願い申し上げます。