2016-10-01から1ヶ月間の記事一覧

今日の関数 searchit その5 (https://github.com/vim/vim)

/* With the SEARCH_END option move to the last character * of the match. Don't do it for an empty match, end * should be same as start then. */ if ((options & SEARCH_END) && !(options & SEARCH_NOOF) && !(matchpos.lnum == endpos.lnum && mat…

今日の関数 searchit その4 (https://github.com/vim/vim)

if (dir == BACKWARD) { /* * Now, if there are multiple matches on this line, * we have to get the last one. Or the last one before * the cursor, if we're on that line. * When putting the new cursor at the end, compare * relative to the end…

今日の関数 searchit その3 (https://github.com/vim/vim)

while (matchpos.lnum == 0 && ((options & SEARCH_END) && first_match ? (nmatched == 1 && (int)endpos.col - 1 < (int)start_pos.col + extra_col) : ((int)matchpos.col - (ptr[matchpos.col] == NUL) < (int)start_pos.col + extra_col))) { search.c …