diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-02 20:20:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-02 20:20:09 +0200 |
commit | b2c0350c67736b0e054718fb5bf136147ee2261e (patch) | |
tree | a1b4a9651813cbb1d8cb1b2362760f5c54e47976 /src | |
parent | 730cde924cea50977bdbfa5b977180bfaa188a27 (diff) | |
download | vim-b2c0350c67736b0e054718fb5bf136147ee2261e.zip |
Make updating text for conceal mode simpler. A few compiler warning fixes.
Diffstat (limited to 'src')
-rw-r--r-- | src/edit.c | 72 | ||||
-rw-r--r-- | src/eval.c | 19 | ||||
-rw-r--r-- | src/gui.c | 46 | ||||
-rw-r--r-- | src/if_ruby.c | 6 | ||||
-rw-r--r-- | src/main.c | 44 | ||||
-rw-r--r-- | src/normal.c | 141 | ||||
-rw-r--r-- | src/search.c | 10 | ||||
-rw-r--r-- | src/undo.c | 16 |
8 files changed, 143 insertions, 211 deletions
diff --git a/src/edit.c b/src/edit.c index 9f7106165..f465f2017 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1457,17 +1457,33 @@ force_cindent: ins_redraw(ready) int ready UNUSED; /* not busy with something */ { +#ifdef FEAT_CONCEAL + linenr_T conceal_old_cursor_line = 0; + linenr_T conceal_new_cursor_line = 0; + int conceal_update_lines = FALSE; +#endif + if (!char_avail()) { -#ifdef FEAT_AUTOCMD +#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL) /* Trigger CursorMoved if the cursor moved. Not when the popup menu is * visible, the command might delete it. */ - if (ready && has_cursormovedI() - && !equalpos(last_cursormoved, curwin->w_cursor) + if (ready && ( +# ifdef FEAT_AUTOCMD + has_cursormovedI() +# endif +# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) + || +# endif +# ifdef FEAT_CONCEAL + curwin->w_p_conceal +# endif + ) + && !equalpos(last_cursormoved, curwin->w_cursor) # ifdef FEAT_INS_EXPAND - && !pum_visible() + && !pum_visible() # endif - ) + ) { # ifdef FEAT_SYN_HL /* Need to update the screen first, to make sure syntax @@ -1477,7 +1493,18 @@ ins_redraw(ready) if (syntax_present(curwin) && must_redraw) update_screen(0); # endif - apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); +# ifdef FEAT_AUTOCMD + if (has_cursormovedI()) + apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); +# endif +# ifdef FEAT_CONCEAL + if (curwin->w_p_conceal) + { + conceal_old_cursor_line = last_cursormoved.lnum; + conceal_new_cursor_line = curwin->w_cursor.lnum; + conceal_update_lines = TRUE; + } +# endif last_cursormoved = curwin->w_cursor; } #endif @@ -1485,6 +1512,15 @@ ins_redraw(ready) update_screen(0); else if (clear_cmdline || redraw_cmdline) showmode(); /* clear cmdline and show mode */ +# if defined(FEAT_CONCEAL) + if (conceal_update_lines + && conceal_old_cursor_line != conceal_new_cursor_line) + { + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; + } +# endif showruler(FALSE); setcursor(); emsg_on_display = FALSE; /* may remove error message now */ @@ -9123,9 +9159,6 @@ ins_s_right() ins_up(startcol) int startcol; /* when TRUE move to Insstart.col */ { -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif pos_T tpos; linenr_T old_topline = curwin->w_topline; #ifdef FEAT_DIFF @@ -9148,13 +9181,6 @@ ins_up(startcol) #ifdef FEAT_CINDENT can_cindent = TRUE; #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } else vim_beep(); @@ -9196,10 +9222,6 @@ ins_pageup() ins_down(startcol) int startcol; /* when TRUE move to Insstart.col */ { -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; - linenr_T oldbotline = curwin->w_botline; -#endif pos_T tpos; linenr_T old_topline = curwin->w_topline; #ifdef FEAT_DIFF @@ -9222,16 +9244,6 @@ ins_down(startcol) #ifdef FEAT_CINDENT can_cindent = TRUE; #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - /* Don't do this if we've scrolled, the line is already - * drawn */ - if (oldbotline == curwin->w_botline) - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } else vim_beep(); diff --git a/src/eval.c b/src/eval.c index 296efda46..a415849e8 100644 --- a/src/eval.c +++ b/src/eval.c @@ -9437,9 +9437,6 @@ f_cursor(argvars, rettv) typval_T *rettv; { long line, col; -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif #ifdef FEAT_VIRTUALEDIT long coladd = 0; #endif @@ -9489,13 +9486,6 @@ f_cursor(argvars, rettv) #endif curwin->w_set_curswant = TRUE; -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif rettv->vval.v_number = 0; } @@ -15165,15 +15155,6 @@ search_cmn(argvars, match_pos, flagsp) /* If 'n' flag is used: restore cursor position. */ if (flags & SP_NOMOVE) curwin->w_cursor = save_cursor; -#ifdef FEAT_CONCEAL - else if (curwin->w_p_conceal - && save_cursor.lnum != curwin->w_cursor.lnum) - { - curwin->w_set_curswant = TRUE; - update_single_line(curwin, save_cursor.lnum); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif else curwin->w_set_curswant = TRUE; theend: @@ -4908,19 +4908,57 @@ no_console_input() void gui_update_screen() { +#ifdef FEAT_CONCEAL + linenr_T conceal_old_cursor_line = 0; + linenr_T conceal_new_cursor_line = 0; + int conceal_update_lines = FALSE; +#endif + update_topline(); validate_cursor(); -#ifdef FEAT_AUTOCMD + +#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL) /* Trigger CursorMoved if the cursor moved. */ - if (!finish_op && has_cursormoved() - && !equalpos(last_cursormoved, curwin->w_cursor)) + if (!finish_op && ( +# ifdef FEAT_AUTOCMD + has_cursormoved() +# endif +# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) + || +# endif +# ifdef FEAT_CONCEAL + curwin->w_p_conceal +# endif + ) + && !equalpos(last_cursormoved, curwin->w_cursor)) { - apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); +# ifdef FEAT_AUTOCMD + if (has_cursormoved()) + apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); +# endif +# ifdef FEAT_CONCEAL + if (curwin->w_p_conceal) + { + conceal_old_cursor_line = last_cursormoved.lnum; + conceal_new_cursor_line = curwin->w_cursor.lnum; + conceal_update_lines = TRUE; + } +# endif last_cursormoved = curwin->w_cursor; } #endif + update_screen(0); /* may need to update the screen */ setcursor(); +# if defined(FEAT_CONCEAL) + if (conceal_update_lines + && conceal_old_cursor_line != conceal_new_cursor_line) + { + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; + } +# endif out_flush(); /* make sure output has been written */ gui_update_cursor(TRUE, FALSE); gui_mch_flush(); diff --git a/src/if_ruby.c b/src/if_ruby.c index 4e1ce4280..2608f1f79 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -609,10 +609,12 @@ static int ensure_ruby_initialized(void) char *argv[] = {"gvim.exe"}; NtInitialize(&argc, &argv); #endif + { #ifdef RUBY19_OR_LATER - RUBY_INIT_STACK; + RUBY_INIT_STACK; #endif - ruby_init(); + ruby_init(); + } #ifdef RUBY19_OR_LATER ruby_script("vim-ruby"); #endif diff --git a/src/main.c b/src/main.c index 2ca1ebe84..964bdd59a 100644 --- a/src/main.c +++ b/src/main.c @@ -980,6 +980,11 @@ main_loop(cmdwin, noexmode) { oparg_T oa; /* operator arguments */ int previous_got_int = FALSE; /* "got_int" was TRUE */ +#ifdef FEAT_CONCEAL + linenr_T conceal_old_cursor_line = 0; + linenr_T conceal_new_cursor_line = 0; + int conceal_update_lines = FALSE; +#endif #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) /* Setup to catch a terminating error from the X server. Just ignore @@ -1079,12 +1084,34 @@ main_loop(cmdwin, noexmode) skip_redraw = FALSE; else if (do_redraw || stuff_empty()) { -#ifdef FEAT_AUTOCMD +#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL) /* Trigger CursorMoved if the cursor moved. */ - if (!finish_op && has_cursormoved() - && !equalpos(last_cursormoved, curwin->w_cursor)) + if (!finish_op && ( +# ifdef FEAT_AUTOCMD + has_cursormoved() +# endif +# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL) + || +# endif +# ifdef FEAT_CONCEAL + curwin->w_p_conceal +# endif + ) + && !equalpos(last_cursormoved, curwin->w_cursor)) { - apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, FALSE, curbuf); +# ifdef FEAT_AUTOCMD + if (has_cursormoved()) + apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, + FALSE, curbuf); +# endif +# ifdef FEAT_CONCEAL + if (curwin->w_p_conceal) + { + conceal_old_cursor_line = last_cursormoved.lnum; + conceal_new_cursor_line = curwin->w_cursor.lnum; + conceal_update_lines = TRUE; + } +# endif last_cursormoved = curwin->w_cursor; } #endif @@ -1164,6 +1191,15 @@ main_loop(cmdwin, noexmode) may_clear_sb_text(); /* clear scroll-back text on next msg */ showruler(FALSE); +# if defined(FEAT_CONCEAL) + if (conceal_update_lines + && conceal_old_cursor_line != conceal_new_cursor_line) + { + update_single_line(curwin, conceal_old_cursor_line); + update_single_line(curwin, conceal_new_cursor_line); + curwin->w_valid &= ~VALID_CROW; + } +# endif setcursor(); cursor_on(); diff --git a/src/normal.c b/src/normal.c index 9ad32f7d8..14578834f 100644 --- a/src/normal.c +++ b/src/normal.c @@ -2298,9 +2298,6 @@ do_mouse(oap, c, dir, count, fixindent) int old_mode = VIsual_mode; #endif int regname; -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif #if defined(FEAT_FOLDING) save_cursor = curwin->w_cursor; @@ -2773,14 +2770,6 @@ do_mouse(oap, c, dir, count, fixindent) curwin->w_cursor = save_cursor; } #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && moved - && (old_curwin != curwin || oldline != curwin->w_cursor.lnum)) - { - update_single_line(old_curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif #if defined(FEAT_CLIPBOARD) && defined(FEAT_CMDWIN) if ((jump_flags & IN_OTHER_WIN) && !VIsual_active && clip_star.available) @@ -5713,9 +5702,6 @@ nv_scroll(cap) linenr_T lnum; #endif int half; -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif cap->oap->motion_type = MLINE; setpcmark(); @@ -5803,13 +5789,6 @@ nv_scroll(cap) cursor_correct(); /* correct for 'so' */ beginline(BL_SOL | BL_FIX); -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } /* @@ -5825,9 +5804,6 @@ nv_right(cap) #else # define PAST_LINE 0 #endif -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) { @@ -5932,13 +5908,6 @@ nv_right(cap) && cap->oap->op_type == OP_NOP) foldOpenCursor(); #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } /* @@ -5951,9 +5920,6 @@ nv_left(cap) cmdarg_T *cap; { long n; -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) { @@ -6012,13 +5978,6 @@ nv_left(cap) && cap->oap->op_type == OP_NOP) foldOpenCursor(); #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } /* @@ -6037,21 +5996,11 @@ nv_up(cap) } else { -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif cap->oap->motion_type = MLINE; if (cursor_up(cap->count1, cap->oap->op_type == OP_NOP) == FAIL) clearopbeep(cap->oap); else if (cap->arg) beginline(BL_WHITE | BL_FIX); -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } } @@ -6080,10 +6029,6 @@ nv_down(cap) else #endif { -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; - linenr_T oldbotline = curwin->w_botline; -#endif #ifdef FEAT_CMDWIN /* In the cmdline window a <CR> executes the command. */ if (cmdwin_type != 0 && cap->cmdchar == CAR) @@ -6096,16 +6041,6 @@ nv_down(cap) clearopbeep(cap->oap); else if (cap->arg) beginline(BL_WHITE | BL_FIX); -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - /* Don't do this if we've scrolled, the line is already - * drawn */ - if (oldbotline == curwin->w_botline) - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } } } @@ -6664,7 +6599,7 @@ nv_percent(cap) cmdarg_T *cap; { pos_T *pos; -#if defined(FEAT_FOLDING) || defined(FEAT_CONCEAL) +#if defined(FEAT_FOLDING) linenr_T lnum = curwin->w_cursor.lnum; #endif @@ -6716,13 +6651,6 @@ nv_percent(cap) && KeyTyped) foldOpenCursor(); #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && lnum != curwin->w_cursor.lnum) - { - update_single_line(curwin, lnum); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } /* @@ -6777,9 +6705,6 @@ nv_mark(cap) nv_findpar(cap) cmdarg_T *cap; { -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif cap->oap->motion_type = MCHAR; cap->oap->inclusive = FALSE; cap->oap->use_reg_one = TRUE; @@ -6795,13 +6720,6 @@ nv_findpar(cap) if ((fdo_flags & FDO_BLOCK) && KeyTyped && cap->oap->op_type == OP_NOP) foldOpenCursor(); #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } } @@ -7723,9 +7641,6 @@ nv_g_cmd(cap) #endif int i; int flag = FALSE; -#ifdef FEAT_CONCEAL - linenr_T oldline; -#endif switch (cap->nchar) { @@ -7867,9 +7782,6 @@ nv_g_cmd(cap) case K_DOWN: /* with 'nowrap' it works just like the normal "j" command; also when * in a closed fold */ -#ifdef FEAT_CONCEAL - oldline = curwin->w_cursor.lnum; -#endif if (!curwin->w_p_wrap #ifdef FEAT_FOLDING || hasFolding(curwin->w_cursor.lnum, NULL, NULL) @@ -7883,22 +7795,12 @@ nv_g_cmd(cap) i = nv_screengo(oap, FORWARD, cap->count1); if (i == FAIL) clearopbeep(oap); -#ifdef FEAT_CONCEAL - else if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif break; case 'k': case K_UP: /* with 'nowrap' it works just like the normal "k" command; also when * in a closed fold */ -#ifdef FEAT_CONCEAL - oldline = curwin->w_cursor.lnum; -#endif if (!curwin->w_p_wrap #ifdef FEAT_FOLDING || hasFolding(curwin->w_cursor.lnum, NULL, NULL) @@ -7912,13 +7814,6 @@ nv_g_cmd(cap) i = nv_screengo(oap, BACKWARD, cap->count1); if (i == FAIL) clearopbeep(oap); -#ifdef FEAT_CONCEAL - else if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif break; /* @@ -8545,9 +8440,6 @@ nv_pipe(cap) nv_bck_word(cap) cmdarg_T *cap; { -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif cap->oap->motion_type = MCHAR; cap->oap->inclusive = FALSE; curwin->w_set_curswant = TRUE; @@ -8557,13 +8449,6 @@ nv_bck_word(cap) else if ((fdo_flags & FDO_HOR) && KeyTyped && cap->oap->op_type == OP_NOP) foldOpenCursor(); #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } /* @@ -8578,9 +8463,6 @@ nv_wordcmd(cap) int word_end; int flag = FALSE; pos_T startpos = curwin->w_cursor; -#ifdef FEAT_CONCEAL - linenr_T oldline = startpos.lnum; -#endif /* * Set inclusive for the "E" and "e" command. @@ -8658,13 +8540,6 @@ nv_wordcmd(cap) foldOpenCursor(); #endif } -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } /* @@ -8827,10 +8702,6 @@ nv_goto(cap) if ((fdo_flags & FDO_JUMP) && KeyTyped && cap->oap->op_type == OP_NOP) foldOpenCursor(); #endif -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal) - changed_window_setting(); -#endif } /* @@ -9256,9 +9127,6 @@ nv_put(cap) int empty = FALSE; int was_visual = FALSE; #endif -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif int dir; int flags = 0; @@ -9378,13 +9246,6 @@ nv_put(cap) } #endif auto_format(FALSE, TRUE); -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif } } diff --git a/src/search.c b/src/search.c index 76ba6607e..3ad9140c1 100644 --- a/src/search.c +++ b/src/search.c @@ -1077,9 +1077,6 @@ do_search(oap, dirc, pat, count, options, tm) char_u *dircp; char_u *strcopy = NULL; char_u *ps; -#ifdef FEAT_CONCEAL - linenr_T oldline = curwin->w_cursor.lnum; -#endif /* * A line offset is not remembered, this is vi compatible. @@ -1425,13 +1422,6 @@ do_search(oap, dirc, pat, count, options, tm) setpcmark(); curwin->w_cursor = pos; curwin->w_set_curswant = TRUE; -#ifdef FEAT_CONCEAL - if (curwin->w_p_conceal && oldline != curwin->w_cursor.lnum) - { - update_single_line(curwin, oldline); - update_single_line(curwin, curwin->w_cursor.lnum); - } -#endif end_do_search: if (options & SEARCH_KEEP) diff --git a/src/undo.c b/src/undo.c index 33ca01e03..497fc6b50 100644 --- a/src/undo.c +++ b/src/undo.c @@ -1551,7 +1551,7 @@ u_read_undo(name, hash, orig_name) int num_head = 0; long old_header_seq, new_header_seq, cur_header_seq; long seq_last, seq_cur; - long_u last_save_nr = 0; + long last_save_nr = 0; short old_idx = -1, new_idx = -1, cur_idx = -1; long num_read_uhps = 0; time_t seq_time; @@ -2662,6 +2662,18 @@ u_undo_end(did_undo, absolute) else u_add_time(msgbuf, sizeof(msgbuf), uhp->uh_time); +#ifdef FEAT_CONCEAL + { + win_T *wp; + + FOR_ALL_WINDOWS(wp) + { + if (wp->w_buffer == curbuf && wp->w_p_conceal) + redraw_win_later(wp, NOT_VALID); + } + } +#endif + smsg((char_u *)_("%ld %s; %s #%ld %s"), u_oldcount < 0 ? -u_oldcount : u_oldcount, _(msgstr), @@ -3230,7 +3242,7 @@ u_eval_tree(first_uhp, list) if (dict == NULL) return; dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL); - dict_add_nr_str(dict, "time", uhp->uh_time, NULL); + dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL); if (uhp == curbuf->b_u_newhead) dict_add_nr_str(dict, "newhead", 1, NULL); if (uhp == curbuf->b_u_curhead) |