2016年2月4日 8:18 am #22365
Yutaka Emura
Keymaster
taka2710 様
いつもお世話になっております。江村です。
ご要望のコマンドをマクロで作成してみたので、もしよろしければお使いください。本体への実装については、検討させてください。
TopLineExtend.jsee (選択範囲を文書の一番上の行へ):
EEID_CSV_CELL_MODE = 3959;
bOldCellMode = (editor.QueryStatusByID( EEID_CSV_CELL_MODE ) & eeStatusLatched);
if( bOldCellMode ) { // if Cell mode
y = document.selection.GetActivePointY( eePosView );
document.selection.LineUp( true, y );
}
else {
x = document.selection.GetActivePointX( eePosView );
document.selection.SetActivePoint( eePosView, x, 1, true );
}
BottomLineExtend.jsee (選択範囲を文書の一番下の行へ):
EEID_CSV_CELL_MODE = 3959;
bOldCellMode = (editor.QueryStatusByID( EEID_CSV_CELL_MODE ) & eeStatusLatched);
if( bOldCellMode ) { // if Cell mode
y = document.GetLines( eeGetLineView ) - document.selection.GetActivePointY( eePosView );
document.selection.LineDown( true, y );
}
else {
x = document.selection.GetActivePointX( eePosView );
y = document.GetLines( eeGetLineView );
document.selection.SetActivePoint( eePosView, x, y, true );
}
TopBottomLineExtend.jsee (選択範囲を文書の一番上から一番下の行へ):
EEID_CSV_CELL_MODE = 3959;
bOldCellMode = (editor.QueryStatusByID( EEID_CSV_CELL_MODE ) & eeStatusLatched);
if( bOldCellMode ) { // if Cell mode
y = document.selection.GetActivePointY( eePosView );
document.selection.LineUp( false, y );
y = document.GetLines( eeGetLineView ) - document.selection.GetActivePointY( eePosView );
document.selection.LineDown( true, y );
}
else {
x1 = document.selection.GetTopPointX( eePosView );
x2 = document.selection.GetBottomPointX( eePosView );
y = document.GetLines( eeGetLineView );
document.selection.SetAnchorPoint( eePosView, x1, 1 );
document.selection.SetActivePoint( eePosView, x2, y, true );
}
また、ご存じだと思いますが、選択範囲を文頭へ (Ctrl+Shift+Home)、選択範囲を文末へ (Ctrl+Shift+End)、[選択開始位置と終了位置を切り替える] (Shift+F8) が本体のコマンドとして利用できます。
よろしくお願いします。