Пример #1
0
void comment_line(pBuffer Buf, CURSOR Line) {
    TextIter Iter = Buf->get_iter_at_offset(Line);
    Buf->insert(Iter, "#");
}
Пример #2
0
void uncomment_line(pBuffer Buf, CURSOR Line) {
    TextIter X = Buf->get_iter_at_offset(Line);
    TextIter Y = Buf->get_iter_at_offset(Line + 1);
    Buf->erase(X, Y);
}
Пример #3
0
Lines get_start_lines(pBuffer Buf, CURSOR X, CURSOR Y) {
    TextIter Xi = Buf->get_iter_at_offset(X);
    Xi.set_line_offset(0);
    TextIter Yi = Buf->get_iter_at_offset(Y);
    return get_starts(Xi, Yi);
}