Lines Matching refs:text
294 char *text, *end; // pointers to the user data in memory member
464 #define text (G.text ) macro
686 if (p > text) { in begin_line()
687 p = memrchr(text, '\n', p - text); in begin_line()
689 return text; in begin_line()
717 if (p > text && p[-1] == '\n') in prev_line()
771 for (q = text; li > 1; li--) { in find_line()
1263 cur = count_lines(text, dot); in format_edit_status()
1456 if (text <= mark[27] && mark[27] <= end - 1) { in swap_context()
1495 if (end >= (text + text_size)) { in text_hole_make()
1497 text_size += end - (text + text_size) + 10240; in text_hole_make()
1498 new_text = xrealloc(text, text_size); in text_hole_make()
1499 bias = (new_text - text); in text_hole_make()
1512 text = new_text; in text_hole_make()
1557 if (src < text || src > end) in text_hole_delete()
1559 if (dest < text || dest >= end) in text_hole_delete()
1569 if (end <= text) in text_hole_delete()
1570 dest = end = text; // keep pointers valid in text_hole_delete()
1683 if ((text + length) == end) in undo_push()
1695 undo_entry->start = undo_queue_spos - text; // use start position from queue in undo_push()
1697 undo_entry->start = src - text; // use offset from start of text buffer in undo_push()
1700 undo_entry->start = src - text; in undo_push()
1748 u_start = text + undo_entry->start; in undo_pop()
1761 u_start = undo_entry->start + text; in undo_pop()
1777 dot = (text + undo_entry->start); in undo_pop()
1804 if (dot > text && dot[-1] != '\n') in dot_left()
1871 if ((dir == FORWARD ? q > end - 1 : q < text) || *q == '\n') { in dot_to_char()
1914 if (p >= end && end > text) { in bound_dot()
1918 if (p < text) { in bound_dot()
1919 p = text; in bound_dot()
1980 if (p < text) in file_insert()
1981 p = text; in file_insert()
2051 if (p < text || p >= end) in find_pair()
2134 if ((dot > text) && (p[-1] != '\n')) { in char_insert()
2178 if (p > text) { in char_insert()
2286 free(text); in init_text_buffer()
2288 screenbegin = dot = end = text = xzalloc(text_size); in init_text_buffer()
2291 rc = file_insert(fn, text, 1); in init_text_buffer()
2294 char_insert(text, '\n', NO_UNDO); in init_text_buffer()
2374 preg.not_bol = p != text; in char_search()
2386 q = text; in char_search()
2401 if (q < text) in char_search()
2402 q = text; in char_search()
2444 stop = text; // assume range is text..p in char_search()
2473 addr = count_lines(text, dot); // default to current line in get_one_address()
2488 addr = count_lines(text, end - 1); in get_one_address()
2506 addr = count_lines(text, q); in get_one_address()
2532 q = char_search(dir > 0 ? text : end - 1, in get_one_address()
2539 addr = count_lines(text, q); in get_one_address()
2591 *e = count_lines(text, end-1); in get_address()
2792 cnt = file_write(current_filename, text, end - 1); in colon()
2802 count_lines(text, end - 1), cnt in colon()
2859 li = count_lines(text, end - 1); in colon()
2888 q = text; // no addr, use 1,$ for the range in colon()
2941 e = count_lines(text, dot); in colon()
2983 li = count_lines(text, end - 1); in colon()
2992 li, (int)(end - text) in colon()
3098 q = text; in colon()
3105 num = count_lines(text, q); in colon()
3109 uintptr_t ofs = q - text; in colon()
3111 q = text + ofs; in colon()
3224 b = e = count_lines(text, q); // cur line number in colon()
3372 if (q == text && q + l == end) { in colon()
3475 if (dir < 0 && p <= text) in skip_thing()
3858 if (text <= q && q < end) {
4039 q = char_search(dir == FORWARD ? text : end - 1,
4060 while (dir == FORWARD ? dot < end - 1 : dot > text) {
4100 cnt = count_lines(text, dot); // remember what line we are on
4304 cnt = file_write(current_filename, text, end - 1);
4308 } else if (cnt == (end - 1 - text + 1)) {
4333 if ((dot + dir) < text || (dot + dir) > end - 1)
4511 if (end == text) {
4512 char_insert(text, '\n', NO_UNDO); // start empty buf with dummy line
4513 dot = text;
4700 if (end < text) {
4706 if (dot < text) {
4712 if (screenbegin < text) {
4732 totalcmds, M, N, I, D, Y, P, U, end - text + 1);
4791 mark[26] = mark[27] = text; // init "previous context"
4805 screenbegin = dot = text;
4831 if ((end - text) > 1) {
4835 string_insert(text, "\n\n##### Ran out of text to work on. #####\n\n", NO_UNDO);
4836 dot = text;