// 範囲選択モードなら、選択範囲を次の単語の右に伸ばす
    // そうでなければ、カーソルにある単語を選択する
    if(selecting) {
        wordrightsalnen;
    }
    else {
        #x0 = x; #y0 = y;
        selectword;
        #x1 = seltopx; #y1 = seltopy;
//      message(str(#x1) + "," + str(#y1));
        left;
        moveto #x1, #y1;
        beginsel;
//      wordrightsalnen;
        gowordend2;
        endsel;
    }