「選択範囲を上下に移動」の版間の差分

MSY-07 (トーク | 投稿記録)
ソースコードの単語の先頭文字を小文字に修正
MSY-07 (トーク | 投稿記録)
行番号をクリック&ドラッグで行を範囲選択した状態でマクロを実行すると移動する行が1行増える不具合を修正
 
(同じ利用者による、間の1版が非表示)
16行目: 16行目:
var ty = s.GetTopPointY(mePosLogical);
var ty = s.GetTopPointY(mePosLogical);
var by = s.GetBottomPointY(mePosLogical);
var by = s.GetBottomPointY(mePosLogical);
var bx = s.GetBottomPointX(mePosLogical);
// 選択範囲の末尾が行頭にあるときの調整
if (ty != by && bx == 1) {
by--;
}
if (ty > 1) {
if (ty > 1) {
Redraw = false;
Redraw = false;
93行目: 100行目:
#title = "選択範囲を下へ移動"
#title = "選択範囲を下へ移動"


var s = document.selection
var s = document.selection;
var ty = s.GetTopPointY(mePosLogical);
var ty = s.GetTopPointY(mePosLogical);
var by = s.GetBottomPointY(mePosLogical);
var by = s.GetBottomPointY(mePosLogical);
var bx = s.GetBottomPointX(mePosLogical);
// 選択範囲の末尾が行頭にあるときの調整
if (ty != by && bx == 1) {
by--;
}
if (document.GetLines(0) > by) {
if (document.GetLines(0) > by) {
Redraw = false;
Redraw = false;
スポンサーリンク