// // 上へ行選択 (2004/09/18) // by IKKI http://www18.big.or.jp/~fujiwara/ikki/ // call SelectPerLine -1; endmacro; SelectPerLine: // ##1 = -1:上へ +1:下へ if (!selecting) { selectline; return; } if (seltopx == x) { ##bx = selendx; ##dx = seltopx; } else { ##bx = seltopx; ##dx = selendx; } if (seltopy == y) { ##by = selendy; ##dy = seltopy; } else { ##by = seltopy; ##dy = selendy; } if (rectselecting) { call Rect ##bx, ##by, ##dx, ##dy, ##1; } else { call Line ##bx, ##by, ##dx, ##dy, ##1; if (x == ##bx && y == ##by) call Line ##dx, ##dy, ##bx, ##by, ##1; // 同じ行に来たら始点を反転 } return; Line: moveto ##1, ##2; beginsel; moveto ##3, ##4; if (##5 < 0) { if (column > 0) golinetop2; else movetolineno 1, lineno - 1; } else { if (lineno == linecount2) golineend2; else movetolineno 1, lineno + 1; } endsel; return; Rect: moveto ##1, ##2; beginrect; moveto ##3, ##4 + ##5; endsel; return;