]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1557: not possible to anchor specific lines in difff mode v9.1.1557
authorYee Cheng Chin <ychin.git@gmail.com>
Wed, 16 Jul 2025 18:36:54 +0000 (20:36 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 16 Jul 2025 18:40:32 +0000 (20:40 +0200)
Problem:  not possible to anchor specific lines in difff mode
Solution: Add support for the anchoring lines in diff mode using the
          'diffanchor' option (Yee Cheng Chin).

Adds support for anchoring specific lines to each other while viewing a
diff. While lines are anchored, they are guaranteed to be aligned to
each other in a diff view, allowing the user to control and inform the
diff algorithm what the desired alignment is. Internally, this is done
by splitting up the buffer at each anchor and run the diff algorithm on
each split section separately, and then merge the results back for a
logically consistent diff result.

To do this, add a new "diffanchors" option that takes a list of
`{address}`, and a new "diffopt" option value "anchor". Each address
specified will be an anchor, and the user can choose to use any type of
address, including marks, line numbers, or pattern search. Anchors are
sorted by line number in each file, and it's possible to have multiple
anchors on the same line (this is useful when doing multi-buffer diff).
Update documentation to provide examples.

This is similar to Git diff's `--anchored` flag. Other diff tools like
Meld/Araxis Merge also have similar features (called "synchronization
points" or "synchronization links"). We are not using Git/Xdiff's
`--anchored` implementation here because it has a very limited API
(it requires usage of the Patience algorithm, and can only anchor
unique lines that are the same across both files).

Because the user could anchor anywhere, diff anchors could result in
adjacent diff blocks (one block is directly touching another without a
gap), if there is a change right above the anchor point. We don't want
to merge these diff blocks because we want to line up the change at the
anchor. Adjacent diff blocks were first allowed when linematch was
added, but the existing code had a lot of branched paths where
line-matched diff blocks were handled differently. As a part of this
change, refactor them to have a more unified code path that is
generalized enough to handle adjacent diff blocks correctly and without
needing to carve in exceptions all over the place.

closes: #17615

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
54 files changed:
runtime/doc/diff.txt
runtime/doc/options.txt
runtime/doc/quickref.txt
runtime/doc/tags
runtime/doc/version9.txt
runtime/optwin.vim
runtime/syntax/vim.vim
src/buffer.c
src/diff.c
src/drawline.c
src/errors.h
src/ex_docmd.c
src/mouse.c
src/move.c
src/option.c
src/option.h
src/optiondefs.h
src/optionstr.c
src/po/vim.pot
src/proto/diff.pro
src/proto/ex_docmd.pro
src/proto/optionstr.pro
src/structs.h
src/testdir/dumps/Test_diff_anchors_00.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_01.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_02.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_03.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_04.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_05.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_06.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_07.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_01.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_02.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_03.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_04.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_05.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_06.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_07.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_08.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_09.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_10.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_11.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_12.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_13.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_14.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_15.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_16.dump [new file with mode: 0644]
src/testdir/dumps/Test_diff_anchors_scrollbind_topline_17.dump [new file with mode: 0644]
src/testdir/dumps/Test_linematch_3diffs1.dump
src/testdir/dumps/Test_linematch_diff1.dump
src/testdir/test_diffmode.vim
src/testdir/test_options.vim
src/testdir/util/gen_opt_test.vim
src/version.c

index 493c740ad4a1f170588c72161855b5a9855d5aa2..97577fd7b0f2c38be7afb556955476896e109f63 100644 (file)
@@ -1,4 +1,4 @@
-*diff.txt*      For Vim version 9.1.  Last change: 2025 Jun 20
+*diff.txt*      For Vim version 9.1.  Last change: 2025 Jul 26
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -14,7 +14,8 @@ The basics are explained in section |08.7| of the user manual.
 2. Viewing diffs               |view-diffs|
 3. Jumping to diffs            |jumpto-diffs|
 4. Copying diffs               |copy-diffs|
-5. Diff options                        |diff-options|
+5. Diff anchors                        |diff-anchors|
+6. Diff options                        |diff-options|
 
 ==============================================================================
 1. Starting diff mode                                  *start-vimdiff*
@@ -336,7 +337,129 @@ name or a part of a buffer name.  Examples:
                                diff mode (e.g., "file.c.v2")
 
 ==============================================================================
-5. Diff options                                                *diff-options*
+5. Diff anchors                                                *diff-anchors*
+
+Diff anchors allow you to control where the diff algorithm aligns and
+synchronize text across files.  Each anchor matches each other in each file,
+allowing you to control the output of a diff.
+
+This is useful when a change involves complicated edits.  For example, if a
+function was moved to another location and further edited.  By default, the
+algorithm aims to create the smallest diff, which results in that entire
+function being considered to be deleted and added on the other side, making it
+hard to see what the actual edit on it was.  You can use diff anchors to pin
+that function so the diff algorithm will align based on it.
+
+To use it, set anchors using 'diffanchors' which is a comma-separated list of
+{address} in each file, and then add "anchor" to 'diffopt'.  Internaly, Vim
+splits each file up into sections split by the anchors.  It performs the diff
+on each pair of sections separately before merging the results back.
+
+Setting 'diffanchors' will update the diff immediately.  If an anchor is tied
+to a mark, and you change what the mark is pointed to, you need to manually
+call |:diffupdate| afterwards to get the updated diff results.
+
+Example:
+
+Let's say we have the following files, side-by-side.  We are interested in the
+change that happened to the function `foo()`, which was both edited and moved.
+
+File A: >
+       int foo() {
+           int n = 1;
+           return n;
+       }
+
+       int g = 1;
+
+       int bar(int a) {
+           a *= 2;
+           a += 3;
+           return a;
+       }
+<File B: >
+       int bar(int a) {
+           a *= 2;
+           a += 3;
+           return a;
+       }
+
+       int foo() {
+           int n = 999;
+           return n;
+       }
+
+       int g = 1;
+<
+A normal diff will usually align the diff result as such: >
+
+       int foo() {     |----------------
+           int n = 1;  |----------------
+           return n;   |----------------
+       }               |----------------
+                       |----------------
+       int g = 1;      |----------------
+                       |----------------
+       int bar(int a) {|int bar(int a) {
+           a *= 2;     |    a *= 2;
+           a += 3;     |    a += 3;
+           return a;   |    return a;
+       }               |}
+       ----------------|
+       ----------------|int foo() {
+       ----------------|    int n = 999;
+       ----------------|    return n;
+       ----------------|}
+       ----------------|
+       ----------------|int g = 1;
+<
+What we want is to instead ask the diff to align on `foo()`: >
+
+       ----------------|int bar(int a) {
+       ----------------|    a *= 2;
+       ----------------|    a += 3;
+       ----------------|    return a;
+       ----------------|}
+       ----------------|
+       int foo() {     |int foo() {
+           int n = 1;  |    int n = 999;
+           return n;   |    return n;
+       }               |}
+                       |
+       int g = 1;      |int g = 1;
+                       |----------------
+       int bar(int a) {|----------------
+           a *= 2;     |----------------
+           a += 3;     |----------------
+           return a;   |----------------
+       }               |----------------
+<
+
+Below are some ways of setting diff anchors to get the above result.  In each
+example, 'diffopt' needs to have `anchor` set for this to take effect.
+
+Marks: Set the |'a| mark on the `int foo()` lines in each file first before
+setting the anchors: >
+       set diffanchors='a
+
+Pattern: Specify the anchor using a |pattern| (see |:/|).  Here, we make sure
+to always start search from line 1 for consistency: >
+       set diffanchors=1/int\ foo(/
+<
+Selection: Use visual mode to select the entire `foo()` function body in each
+file.  Here, we use two anchors.  This does a better job of making sure only
+the function bodies are anchored against each other but not the lines after
+it.  Note the `'>+1` below.  The "+1" is necessary as we want the split to
+happen below the last line of the function, not above: >
+       set diffanchors='<,'>+1
+<
+Manually set two anchors using line numbers via buffer-local options: >
+       setlocal diffanchors=1,5
+       wincmd w
+       setlocal diffanchors=7,11
+<
+==============================================================================
+6. Diff options                                                *diff-options*
 
 Also see |'diffopt'| and the "diff" item of |'fillchars'|.
 
index 44079bbbd408018a47157ddf43f873e10708e215..a624a9ac6d7baccff7ceb7c61749099cecefa7e4 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Jul 13
+*options.txt*  For Vim version 9.1.  Last change: 2025 Jul 16
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2986,6 +2986,28 @@ A jump table for the options with a short description can be found at |Q_op|.
        Join the current window in the group of windows that shows differences
        between files.  See |vimdiff|.
 
+                                           *'dia'* *'diffanchors'* *E1549*
+'diffanchors' 'dia'    string  (default "")
+                       global or local to buffer |global-local|
+       List of {address} in each buffer, separated by commas, that are
+       considered anchors when used for diffing.  It's valid to specify "$+1"
+       for 1 past the last line.  "%" cannot be used for this option.  There
+       can be at most 20 anchors set for each buffer.
+
+       Each anchor line splits the buffer (the split happens above the
+       anchor), with each part being diff'ed separately before the final
+       result is joined.  When more than one {address} are provided, the
+       anchors will be sorted interally by line number.  If using buffer
+       local options, each buffer should have the same number of anchors
+       (extra anchors will be ignored).  This option is only used when
+       'diffopt' has "anchor" set.  See |diff-anchors| for more details and
+       examples.
+                                                               *E1550*
+       If some of the {address} do not resolve to a line in each buffer (e.g.
+       a pattern search that does not match anything), none of the anchors
+       will be used.
+
+
                                                *'dex'* *'diffexpr'*
 'diffexpr' 'dex'       string  (default "")
                        global
@@ -3014,6 +3036,10 @@ A jump table for the options with a short description can be found at |Q_op|.
                                patience   patience diff algorithm
                                histogram  histogram diff algorithm
 
+               anchor          Anchor specific lines in each buffer to be
+                               aligned with each other if 'diffanchors' is
+                               set.  See |diff-anchors|.
+
                closeoff        When a window is closed where 'diff' is set
                                and there is only one window remaining in the
                                same tab page with 'diff' set, execute
@@ -3116,6 +3142,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                                "linematch:60", as this will enable alignment
                                for a 2 buffer diff hunk of 30 lines each,
                                or a 3 buffer diff hunk of 20 lines each.
+                               Implicitly sets "filler" when this is set.
 
                vertical        Start diff mode with vertical splits (unless
                                explicitly specified otherwise).
index a5d25b0dec4afc1030fc8b660ad1f9c3461553ce..bc308987f696bea2cf26e197516e20b0b489d363 100644 (file)
@@ -1,4 +1,4 @@
-*quickref.txt*  For Vim version 9.1.  Last change: 2025 Jun 28
+*quickref.txt*  For Vim version 9.1.  Last change: 2025 Jul 16
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -682,6 +682,7 @@ Short explanation of each option:           *option-list*
 'delcombine'     'deco'    delete combining characters on their own
 'dictionary'     'dict'    list of file names used for keyword completion
 'diff'                     use diff mode for the current window
+'diffanchors'    'dia'     list of {address} to force anchoring of a diff
 'diffexpr'       'dex'     expression used to obtain a diff file
 'diffopt'        'dip'     options for using diff mode
 'digraph'        'dg'      enable the entering of digraphs in Insert mode
index 8251c73d412583e54c0dcc33d50ed8f54102d1a6..d317ee7e785c5a4232a18e8529cadbf5bf59ce63 100644 (file)
@@ -216,9 +216,11 @@ $quote     eval.txt        /*$quote*
 'delcombine'   options.txt     /*'delcombine'*
 'dex'  options.txt     /*'dex'*
 'dg'   options.txt     /*'dg'*
+'dia'  options.txt     /*'dia'*
 'dict' options.txt     /*'dict'*
 'dictionary'   options.txt     /*'dictionary'*
 'diff' options.txt     /*'diff'*
+'diffanchors'  options.txt     /*'diffanchors'*
 'diffexpr'     options.txt     /*'diffexpr'*
 'diffopt'      options.txt     /*'diffopt'*
 'digraph'      options.txt     /*'digraph'*
@@ -4667,7 +4669,9 @@ E1540     eval.txt        /*E1540*
 E1541  vi_diff.txt     /*E1541*
 E1547  various.txt     /*E1547*
 E1548  wayland.txt     /*E1548*
+E1549  options.txt     /*E1549*
 E155   sign.txt        /*E155*
+E1550  options.txt     /*E1550*
 E156   sign.txt        /*E156*
 E157   sign.txt        /*E157*
 E158   sign.txt        /*E158*
@@ -6935,6 +6939,7 @@ dict-modification eval.txt        /*dict-modification*
 did_filetype() builtin.txt     /*did_filetype()*
 diff   diff.txt        /*diff*
 diff() builtin.txt     /*diff()*
+diff-anchors   diff.txt        /*diff-anchors*
 diff-diffexpr  diff.txt        /*diff-diffexpr*
 diff-func-examples     diff.txt        /*diff-func-examples*
 diff-mode      diff.txt        /*diff-mode*
index 961790bf25824fbe1ac7d3c0398fa040ef551a3d..205366363bafdfc3457e018c3d0f29a62ebac85b 100644 (file)
@@ -1,4 +1,4 @@
-*version9.txt*  For Vim version 9.1.  Last change: 2025 Jul 15
+*version9.txt*  For Vim version 9.1.  Last change: 2025 Jul 16
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -41570,6 +41570,12 @@ the "inline" sub option value for the 'diffopt' setting, with "inline:simple"
 being added to the default "diffopt" value (but this does not change how diff
 mode works).
 
+The 'diffanchors' option specifies a comma-separated list of addresses in
+a buffer that act as anchor points for splitting and independently diffing
+buffer sections, improving diff alignment.  It is only used when 'diffopt'
+includes "anchor" and all specified addresses must resolve in every buffer, or
+else the anchors are ignored.
+
 Completion~
 ----------
 - New Insert-mode completion: |i_CTRL-X_CTRL-R| to complete words from
@@ -41799,6 +41805,7 @@ Options: ~
                        |ins-completion| modes
 'completeitemalign'    Order of |complete-items| in Insert mode completion
                        popup
+'diffanchors'          list of {address} to force syncing of diffs
 'eventignorewin'       autocommand events that are ignored in a window
 'findfunc'             Vim function to obtain the results for a |:find|
                        command
index 769f46d6db73c350010483f09a33a8254bfce1ce..80dcec79dc3bf0dce5a8ea910c64cba795ce4fa5 100644 (file)
@@ -1,7 +1,7 @@
 " These commands create the option window.
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Jul 10
+" Last Change: 2025 Jul 16
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " If there already is an option window, jump to that one.
@@ -1056,6 +1056,9 @@ if has("diff")
   call <SID>OptionG("dip", &dip)
   call <SID>AddOption("diffexpr", gettext("expression used to obtain a diff file"))
   call <SID>OptionG("dex", &dex)
+  call <SID>AddOption("diffanchors", gettext("list of addresses for anchoring a diff"))
+  call append("$", "\t" .. s:global_or_local)
+  call <SID>OptionG("dia", &dia)
   call <SID>AddOption("patchexpr", gettext("expression used to patch a file"))
   call <SID>OptionG("pex", &pex)
 endif
index c5bafe67a57e8ea6c43b310ed5d274d3ad15c359..2adffe9c410c06bf470a645ccea28924b9a728d4 100644 (file)
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkearns@gmail.com>
-" Last Change:    2025 Jul 14
+" Last Change:    2025 Jul 16
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -52,14 +52,14 @@ syn keyword vimStdPlugin contained  Arguments Asm Break Cfilter Clear Continue Di
 " vimOptions are caught only when contained in a vimSet {{{2
 " GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
 syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert chi chistory cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard cpm clipmethod ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained cpt complete cfu completefunc cfc completefuzzycollect cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore eiw eventignorewin et expandtab skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained msc maxsearchcount mis menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pmw pummaxwidth pw pumwidth pythondll skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained stpl showtabpanel ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax tpl tabpanel tplo tabpanelopt ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth skipwhite nextgroup=vimSetEqual,vimSetMod
-syn keyword vimOption contained wse wlseat wst wlsteal wtm wltimeoutlen wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained cpt complete cfu completefunc cfc completefuzzycollect cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dia diffanchors dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore eiw eventignorewin skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained mmt maxmemtot msc maxsearchcount mis menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pmw pummaxwidth skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained smd showmode stal showtabline stpl showtabpanel ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax tpl tabpanel tplo tabpanelopt ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight skipwhite nextgroup=vimSetEqual,vimSetMod
+syn keyword vimOption contained wmw winminwidth winptydll wiw winwidth wse wlseat wst wlsteal wtm wltimeoutlen wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod
 
 " vimOptions: These are the turn-off setting variants {{{2
 " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR=''
@@ -91,7 +91,7 @@ syn match   vimOption contained       "t_k;"
 " vimOptions: These are the variable names {{{2
 " GEN_SYN_VIM: vimOption normal variable,           START_STR='syn keyword vimOptionVarName contained', END_STR=''
 syn keyword vimOptionVarName contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert chi chistory cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard cpm clipmethod ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible
-syn keyword vimOptionVarName contained cpt complete cfu completefunc cfc completefuzzycollect cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore eiw eventignorewin
+syn keyword vimOptionVarName contained cpt complete cfu completefunc cfc completefuzzycollect cia completeitemalign cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dia diffanchors dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore eiw eventignorewin
 syn keyword vimOptionVarName contained et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase ft filetype fcs fillchars ffu findfunc fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring
 syn keyword vimOptionVarName contained ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode ise isexpand isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lhi lhistory lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern
 syn keyword vimOptionVarName contained mmt maxmemtot msc maxsearchcount mis menuitems mopt messagesopt msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pmw pummaxwidth
index 0bac265b7468b78249fa95f2684e84b7c8ad89c6..748ffdaa7e2dec91ac31b16293629baed2a36903 100644 (file)
@@ -2524,6 +2524,9 @@ free_buf_options(
     free_callback(&buf->b_ffu_cb);
 #endif
     clear_string_option(&buf->b_p_dict);
+#ifdef FEAT_DIFF
+    clear_string_option(&buf->b_p_dia);
+#endif
     clear_string_option(&buf->b_p_tsr);
     clear_string_option(&buf->b_p_qe);
     buf->b_p_ar = -1;
index b212e71fe5ea9cf3dfa59c5b66e583898cb6dfb4..21fb7483818107fe558bd1fada83460832d5b44b 100644 (file)
@@ -42,6 +42,7 @@ static int diff_need_update = FALSE; // ex_diffupdate needs to be called
 #define DIFF_INLINE_SIMPLE  0x4000  // inline highlight with simple algorithm
 #define DIFF_INLINE_CHAR    0x8000  // inline highlight with character diff
 #define DIFF_INLINE_WORD    0x10000 // inline highlight with word diff
+#define DIFF_ANCHOR    0x20000 // use 'diffanchors' to anchor the diff
 #define ALL_WHITE_DIFF (DIFF_IWHITE | DIFF_IWHITEALL | DIFF_IWHITEEOL)
 #define ALL_INLINE (DIFF_INLINE_NONE | DIFF_INLINE_SIMPLE | DIFF_INLINE_CHAR | DIFF_INLINE_WORD)
 #define ALL_INLINE_DIFF (DIFF_INLINE_CHAR | DIFF_INLINE_WORD)
@@ -59,6 +60,8 @@ static int diff_bin_works = MAYBE; // TRUE when "diff --binary" works, FALSE
                                   // checked yet
 #endif
 
+#define MAX_DIFF_ANCHORS 20
+
 // used for diff input
 typedef struct {
     char_u     *din_fname;  // used for external diff
@@ -113,6 +116,7 @@ static int parse_diff_ed(char_u *line, diffhunk_T *hunk);
 static int parse_diff_unified(char_u *line, diffhunk_T *hunk);
 static int xdiff_out_indices(long start_a, long count_a, long start_b, long count_b, void *priv);
 static int xdiff_out_unified(void *priv, mmbuffer_t *mb, int nbuf);
+static int parse_diffanchors(int check_only, buf_T *buf, linenr_T *anchors, int *num_anchors);
 
 #define FOR_ALL_DIFFBLOCKS_IN_TAB(tp, dp) \
     for ((dp) = (tp)->tp_first_diff; (dp) != NULL; (dp) = (dp)->df_next)
@@ -410,10 +414,22 @@ diff_mark_adjust_tp(
        // 1. change completely above line1: nothing to do
        if (last >= line1 - 1)
        {
+           if (diff_busy)
+           {
+               // Currently in the middle of updating diff blocks. All we want
+               // is to adjust the line numbers and nothing else.
+               if (dp->df_lnum[idx] > line2)
+                   dp->df_lnum[idx] += amount_after;
+
+               // Advance to next entry.
+               dprev = dp;
+               dp = dp->df_next;
+               continue;
+           }
+
            // 6. change below line2: only adjust for amount_after; also when
            // "deleted" became zero when deleted all lines between two diffs
-           if (dp->df_lnum[idx] - (deleted + inserted != 0) > line2 -
-                                               (dp->is_linematched ? 1 : 0))
+           if (dp->df_lnum[idx] - (deleted + inserted != 0) > line2)
            {
                if (amount_after == 0)
                    break;      // nothing left to change
@@ -516,7 +532,7 @@ diff_mark_adjust_tp(
        }
 
        // check if this block touches the previous one, may merge them.
-       if (dprev != NULL && !dp->is_linematched
+       if (dprev != NULL && !dp->is_linematched && !diff_busy
                                && dprev->df_lnum[idx] + dprev->df_count[idx]
                                                        == dp->df_lnum[idx])
        {
@@ -720,7 +736,7 @@ diff_redraw(
 #endif
        // A change may have made filler lines invalid, need to take care of
        // that for other windows.
-       n = diff_check(wp, wp->w_topline);
+       n = diff_check_fill(wp, wp->w_topline);
        if ((wp != curwin && wp->w_topfill > 0) || n > 0)
        {
            if (wp->w_topfill > n)
@@ -783,7 +799,7 @@ diff_write_buffer(buf_T *buf, diffin_T *din, linenr_T start, linenr_T end)
     if (end < 0)
        end = buf->b_ml.ml_line_count;
 
-    if (buf->b_ml.ml_flags & ML_EMPTY)
+    if (buf->b_ml.ml_flags & ML_EMPTY || end < start)
     {
        din->din_mmfile.ptr = NULL;
        din->din_mmfile.size = 0;
@@ -868,31 +884,55 @@ diff_write_buffer(buf_T *buf, diffin_T *din, linenr_T start, linenr_T end)
  * Return FAIL for failure.
  */
     static int
-diff_write(buf_T *buf, diffin_T *din)
+diff_write(buf_T *buf, diffin_T *din, linenr_T start, linenr_T end)
 {
     int                r;
+    int                save_ml_flags;
     char_u     *save_ff;
     int                save_cmod_flags;
 
     if (din->din_fname == NULL)
-       return diff_write_buffer(buf, din, 1, -1);
+       return diff_write_buffer(buf, din, start, end);
+
+    if (end < 0)
+       end = buf->b_ml.ml_line_count;
 
     // Always use 'fileformat' set to "unix".
+    save_ml_flags = buf->b_ml.ml_flags;
     save_ff = buf->b_p_ff;
     buf->b_p_ff = vim_strsave((char_u *)FF_UNIX);
     save_cmod_flags = cmdmod.cmod_flags;
     // Writing the buffer is an implementation detail of performing the diff,
     // so it shouldn't update the '[ and '] marks.
     cmdmod.cmod_flags |= CMOD_LOCKMARKS;
+    if (end < start)
+    {
+       // The line range specifies a completely empty file.
+       end = start;
+       buf->b_ml.ml_flags |= ML_EMPTY;
+    }
     r = buf_write(buf, din->din_fname, NULL,
-                       (linenr_T)1, buf->b_ml.ml_line_count,
+                       start, end,
                        NULL, FALSE, FALSE, FALSE, TRUE);
     cmdmod.cmod_flags = save_cmod_flags;
     free_string_option(buf->b_p_ff);
     buf->b_p_ff = save_ff;
+    buf->b_ml.ml_flags = save_ml_flags;
     return r;
 }
 
+    static int
+lnum_compare(const void *s1, const void *s2)
+{
+    linenr_T   lnum1 = *(linenr_T*)s1;
+    linenr_T   lnum2 = *(linenr_T*)s2;
+    if (lnum1 < lnum2)
+       return -1;
+    if (lnum1 > lnum2)
+       return 1;
+    return 0;
+}
+
 /*
  * Update the diffs for all buffers involved.
  */
@@ -934,31 +974,113 @@ diff_try_update(
                buf_check_timestamp(buf, FALSE);
        }
 
-    // Write the first buffer to a tempfile or mmfile_t.
-    buf = curtab->tp_diffbuf[idx_orig];
-    if (diff_write(buf, &dio->dio_orig) == FAIL)
-       goto theend;
-
-    // Make a difference between the first buffer and every other.
-    for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+    // Parse and sort diff anchors if enabled
+    int num_anchors = INT_MAX;
+    linenr_T anchors[DB_COUNT][MAX_DIFF_ANCHORS];
+    CLEAR_FIELD(anchors);
+    if (diff_flags & DIFF_ANCHOR)
     {
-       buf = curtab->tp_diffbuf[idx_new];
-       if (buf == NULL || buf->b_ml.ml_mfp == NULL)
-           continue; // skip buffer that isn't loaded
+       for (int idx = 0; idx < DB_COUNT; idx++)
+       {
+           if (curtab->tp_diffbuf[idx] == NULL)
+               continue;
+           int buf_num_anchors = 0;
+           if (parse_diffanchors(FALSE,
+                       curtab->tp_diffbuf[idx],
+                       anchors[idx],
+                       &buf_num_anchors) != OK)
+           {
+               emsg(_(e_failed_to_find_all_diff_anchors));
+               num_anchors = 0;
+               CLEAR_FIELD(anchors);
+               break;
+           }
+           if (buf_num_anchors < num_anchors)
+               num_anchors = buf_num_anchors;
+
+           if (buf_num_anchors > 0)
+               qsort((void *)anchors[idx],
+                       (size_t)buf_num_anchors,
+                       sizeof(linenr_T),
+                       lnum_compare);
+       }
+    }
+    if (num_anchors == INT_MAX)
+       num_anchors = 0;
+
+    // Split the files into multiple sections by anchors. Each section starts
+    // from one anchor (inclusive) and ends at the next anchor (exclusive).
+    // Diff each section separately before combining the results. If we don't
+    // have any anchors, we will have one big section of the entire file.
+    for (int anchor_i = 0; anchor_i <= num_anchors; anchor_i++)
+    {
+       diff_T  *orig_diff = NULL;
+       if (anchor_i != 0)
+       {
+           orig_diff = curtab->tp_first_diff;
+           curtab->tp_first_diff = NULL;
+       }
+       linenr_T lnum_start = (anchor_i == 0) ? 1 : anchors[idx_orig][anchor_i - 1];
+       linenr_T lnum_end = (anchor_i == num_anchors) ? -1 : anchors[idx_orig][anchor_i] - 1;
 
-       // Write the other buffer and diff with the first one.
-       if (diff_write(buf, &dio->dio_new) == FAIL)
-           continue;
-       if (diff_file(dio) == FAIL)
-           continue;
+       // Write the first buffer to a tempfile or mmfile_t.
+       buf = curtab->tp_diffbuf[idx_orig];
+       if (diff_write(buf, &dio->dio_orig, lnum_start, lnum_end) == FAIL)
+       {
+           if (orig_diff != NULL)
+           {
+               // Clean up in-progress diff blocks
+               curtab->tp_first_diff = orig_diff;
+               diff_clear(curtab);
+           }
+           goto theend;
+       }
 
-       // Read the diff output and add each entry to the diff list.
-       diff_read(idx_orig, idx_new, dio);
+       // Make a difference between the first buffer and every other.
+       for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new)
+       {
+           buf = curtab->tp_diffbuf[idx_new];
+           if (buf == NULL || buf->b_ml.ml_mfp == NULL)
+               continue; // skip buffer that isn't loaded
 
-       clear_diffin(&dio->dio_new);
-       clear_diffout(&dio->dio_diff);
+           lnum_start = anchor_i == 0 ? 1 : anchors[idx_new][anchor_i - 1];
+           lnum_end = anchor_i == num_anchors ? -1 : anchors[idx_new][anchor_i] - 1;
+
+           // Write the other buffer and diff with the first one.
+           if (diff_write(buf, &dio->dio_new, lnum_start, lnum_end) == FAIL)
+               continue;
+           if (diff_file(dio) == FAIL)
+               continue;
+
+           // Read the diff output and add each entry to the diff list.
+           diff_read(idx_orig, idx_new, dio);
+
+           clear_diffin(&dio->dio_new);
+           clear_diffout(&dio->dio_diff);
+       }
+       clear_diffin(&dio->dio_orig);
+
+       if (anchor_i != 0)
+       {
+           // Combine the new diff blocks with the existing ones
+           for (diff_T *dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
+           {
+               for (int idx = 0; idx < DB_COUNT; idx++)
+               {
+                   if (anchors[idx][anchor_i - 1] > 0)
+                       dp->df_lnum[idx] += anchors[idx][anchor_i - 1] - 1;
+               }
+           }
+           if (orig_diff != NULL)
+           {
+               diff_T *last_diff = orig_diff;
+               while (last_diff->df_next != NULL)
+                   last_diff = last_diff->df_next;
+               last_diff->df_next = curtab->tp_first_diff;
+               curtab->tp_first_diff = orig_diff;
+           }
+       }
     }
-    clear_diffin(&dio->dio_orig);
 
 theend:
     vim_free(dio->dio_orig.din_fname);
@@ -2025,10 +2147,15 @@ get_max_diff_length(const diff_T *dp)
     return maxlength;
 }
 
+/*
+ * Find the first diff block that includes the specified line. Also find the
+ * next diff block that's not in the current chain of adjacent blocks that are
+ * all touching each other directly.
+ */
     static void
 find_top_diff_block(
     diff_T     **thistopdiff,
-    diff_T     **nextblockblock,
+    diff_T     **next_adjacent_blocks,
     int                fromidx,
     int                topline)
 {
@@ -2071,61 +2198,17 @@ find_top_diff_block(
            // block, set the marker of the next block and finish the iteration
            if (*thistopdiff)
            {
-               (*nextblockblock) = topdiff->df_next;
+               (*next_adjacent_blocks) = topdiff->df_next;
                break;
            }
        }
     }
 }
 
-    static void
-count_filler_lines_and_topline(
-    int                        *curlinenum_to,
-    int                        *linesfiller,
-    const diff_T       *thistopdiff,
-    const int          toidx,
-    int                        virtual_lines_passed)
-{
-    const diff_T       *curdif = thistopdiff;
-    int                        ch_virtual_lines = 0;
-    int                        isfiller = FALSE;
-
-    while (virtual_lines_passed > 0)
-    {
-       if (ch_virtual_lines)
-       {
-           virtual_lines_passed--;
-           ch_virtual_lines--;
-           if (!isfiller)
-               (*curlinenum_to)++;
-           else
-               (*linesfiller)++;
-       }
-       else
-       {
-           (*linesfiller) = 0;
-           if (curdif)
-           {
-               ch_virtual_lines = get_max_diff_length(curdif);
-               isfiller = (curdif->df_count[toidx] ? FALSE : TRUE);
-           }
-           if (isfiller)
-           {
-               while (curdif && curdif->df_next &&
-                      curdif->df_lnum[toidx] ==
-                                       curdif->df_next->df_lnum[toidx] &&
-                      curdif->df_next->df_count[toidx] == 0)
-               {
-                   curdif = curdif->df_next;
-                   ch_virtual_lines += get_max_diff_length(curdif);
-               }
-           }
-           if (curdif)
-               curdif = curdif->df_next;
-       }
-    }
-}
-
+/*
+ * Calculates topline/topfill of a target diff window to fit the source diff
+ * window.
+ */
     static void
 calculate_topfill_and_topline(
     const int  fromidx,
@@ -2135,15 +2218,19 @@ calculate_topfill_and_topline(
     int                *topfill,
     linenr_T   *topline)
 {
-    // 1. find the position from the top of the diff block, and the start
-    // of the next diff block
+    // find the position from the top of the diff block, and the next diff
+    // block that's no longer adjacent to the current block. "Adjacency" means
+    // a chain of diff blocks that are directly touching each other, allowed by
+    // linematch and diff anchors.
     diff_T     *thistopdiff = NULL;
-    diff_T     *nextblockblock = NULL;
+    diff_T     *next_adjacent_blocks = NULL;
     int                virtual_lines_passed = 0;
 
-    find_top_diff_block(&thistopdiff, &nextblockblock, fromidx, from_topline);
+    find_top_diff_block(&thistopdiff, &next_adjacent_blocks, fromidx, from_topline);
 
-    // count the virtual lines that have been passed
+    // count the virtual lines (either filler or concrete line) that have been
+    // passed in the source buffer. There could be multiple diff blocks if
+    // there are adjacent empty blocks (count == 0 at fromidx).
     diff_T *curdif = thistopdiff;
     while (curdif && (curdif->df_lnum[fromidx] + curdif->df_count[fromidx])
                                                        <= from_topline)
@@ -2153,73 +2240,48 @@ calculate_topfill_and_topline(
        curdif = curdif->df_next;
     }
 
-    if (curdif != nextblockblock)
+    if (curdif != next_adjacent_blocks)
        virtual_lines_passed += from_topline - curdif->df_lnum[fromidx];
     virtual_lines_passed -= from_topfill;
 
-    // count the same amount of virtual lines in the toidx buffer
-    int curlinenum_to = thistopdiff->df_lnum[toidx];
-    int linesfiller = 0;
-
-    count_filler_lines_and_topline(&curlinenum_to, &linesfiller, thistopdiff,
-                                  toidx, virtual_lines_passed);
-
-    // count the number of filler lines that would normally be above this line
-    int maxfiller = 0;
-    for (diff_T *dpfillertest = thistopdiff; dpfillertest != NULL;
-                                       dpfillertest = dpfillertest->df_next)
-    {
-       if (dpfillertest->df_lnum[toidx] == curlinenum_to)
-       {
-           while (dpfillertest && dpfillertest->df_lnum[toidx] ==
-                                                       curlinenum_to)
-           {
-               maxfiller += dpfillertest->df_count[toidx] ? 0 :
-                                       get_max_diff_length(dpfillertest);
-               dpfillertest = dpfillertest->df_next;
-           }
-           break;
-       }
-    }
-    (*topfill) = maxfiller - linesfiller;
-    (*topline) = curlinenum_to;
-}
+    // clamp negative values in case from_topfill hasn't been updated yet and
+    // is larger than total virtual lines, which could happen when setting
+    // diffopt multiple times
+    if (virtual_lines_passed < 0)
+       virtual_lines_passed = 0;
 
-    static int
-linematched_filler_lines(diff_T *dp, int idx, linenr_T lnum, int *linestatus)
-{
-    int filler_lines_d1 = 0;
+    // move the same amount of virtual lines in the target buffer to find the
+    // cursor's line number
+    int curlinenum_to = thistopdiff->df_lnum[toidx];
 
-    while (dp && dp->df_next &&
-          lnum == (dp->df_lnum[idx] + dp->df_count[idx]) &&
-          dp->df_next->df_lnum[idx] == lnum)
+    int virt_lines_left = virtual_lines_passed;
+    curdif = thistopdiff;
+    while (virt_lines_left > 0 && curdif != NULL && curdif != next_adjacent_blocks)
     {
-       if (dp->df_count[idx] == 0)
-           filler_lines_d1 += get_max_diff_length(dp);
-       dp = dp->df_next;
+       curlinenum_to += MIN(virt_lines_left, curdif->df_count[toidx]);
+       virt_lines_left -= MIN(virt_lines_left, get_max_diff_length(curdif));
+       curdif = curdif->df_next;
     }
 
-    if (dp->df_count[idx] == 0)
-       filler_lines_d1 += get_max_diff_length(dp);
-
-    if (lnum < dp->df_lnum[idx] + dp->df_count[idx])
+    // count the total number of virtual lines between the top diff block and
+    // the found line in the target buffer
+    int max_virt_lines = 0;
+    for (diff_T *dp = thistopdiff; dp != NULL; dp = dp->df_next)
     {
-       int j = 0;
-
-       for (int i = 0; i < DB_COUNT; i++)
+       if (dp->df_lnum[toidx] + dp->df_count[toidx] <= curlinenum_to)
+           max_virt_lines += get_max_diff_length(dp);
+       else
        {
-           if (curtab->tp_diffbuf[i] != NULL)
-           {
-               if (dp->df_count[i])
-                   j++;
-           }
-           // is this an added line or a changed line?
-           if (linestatus)
-               (*linestatus) = (j == 1) ? -2 : -1;
+           if (dp->df_lnum[toidx] <= curlinenum_to)
+               max_virt_lines += curlinenum_to - dp->df_lnum[toidx];
+           break;
        }
     }
 
-    return filler_lines_d1;
+    if (diff_flags & DIFF_FILLER)
+       // should always be non-negative as max_virt_lines is larger
+       (*topfill) = max_virt_lines - virtual_lines_passed;
+    (*topline) = curlinenum_to;
 }
 
 // Apply results from the linematch algorithm and apply to 'dp' by splitting it
@@ -2340,18 +2402,19 @@ run_linematch_algorithm(diff_T *dp)
 
 /*
  * Check diff status for line "lnum" in buffer "buf":
- * Returns 0 for nothing special
- * Returns -1 for a line that should be highlighted as changed.
- * Returns -2 for a line that should be highlighted as added/deleted.
  * Returns > 0 for inserting that many filler lines above it (never happens
- * when 'diffopt' doesn't contain "filler").
+ * when 'diffopt' doesn't contain "filler"). Otherwise returns 0.
+ *
+ * "linestatus" (can be NULL) will be set to:
+ * 0 for nothing special.
+ * -1 for a line that should be highlighted as changed.
+ * -2 for a line that should be highlighted as added/deleted.
+ *
  * This should only be used for windows where 'diff' is set.
- * When diffopt contains linematch, a changed/added/deleted line
- * may also have filler lines above it. In such a case, the possibilities
- * are no longer mutually exclusive. The number of filler lines is
- * returned from diff_check, and the integer 'linestatus' passed by
- * pointer is set to -1 to indicate a changed line, and -2 to indicate an
- * added line
+ *
+ * Note that it's possible for a changed/added/deleted line to also have filler
+ * lines above it. This happens when using linematch or using diff anchors (at
+ * the anchored lines).
  */
     int
 diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
@@ -2363,6 +2426,9 @@ diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
     buf_T      *buf = wp->w_buffer;
     int                cmp;
 
+    if (linestatus != NULL)
+       *linestatus = 0;
+
     if (curtab->tp_diff_invalid)
        ex_diffupdate(NULL);            // update after a big change
 
@@ -2397,8 +2463,32 @@ diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
                                && diff_check_sanity(curtab, dp))
        run_linematch_algorithm(dp);
 
-    if (dp->is_linematched)
-       return linematched_filler_lines(dp, idx, lnum, linestatus);
+    // Insert filler lines above the line just below the change.  Will return 0
+    // when this buf had the max count.
+    int num_fill = 0;
+    while (lnum == dp->df_lnum[idx] + dp->df_count[idx])
+    {
+       // Only calculate fill lines if 'diffopt' contains "filler". Otherwise
+       // returns 0 filler lines.
+       if (diff_flags & DIFF_FILLER)
+       {
+           maxcount = get_max_diff_length(dp);
+           num_fill += maxcount - dp->df_count[idx];
+       }
+
+       // If there are adjacent blocks (e.g. linematch or anchor), loop
+       // through them. It's possible for multiple adjacent blocks to
+       // contribute to filler lines.
+       // This also helps us find the last diff block in the list of adjacent
+       // blocks which is necessary when it is a change/inserted line right
+       // after added lines.
+       if (dp->df_next != NULL
+               && lnum >= dp->df_next->df_lnum[idx]
+               && lnum <= dp->df_next->df_lnum[idx] + dp->df_next->df_count[idx])
+           dp = dp->df_next;
+       else
+           break;
+    }
 
     if (lnum < dp->df_lnum[idx] + dp->df_count[idx])
     {
@@ -2416,7 +2506,11 @@ diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
                else
                {
                    if (dp->df_count[i] != dp->df_count[idx])
-                       return -1;          // nr of lines changed.
+                   {
+                       if (linestatus)
+                           *linestatus = -1;   // nr of lines changed.
+                       return num_fill;
+                   }
                    cmp = TRUE;
                }
            }
@@ -2428,7 +2522,11 @@ diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
                if (i != idx && curtab->tp_diffbuf[i] != NULL
                                                      && dp->df_count[i] != 0)
                    if (!diff_equal_entry(dp, idx, i))
-                       return -1;
+                   {
+                       if (linestatus)
+                           *linestatus = -1;
+                       return num_fill;
+                   }
        }
        // If there is no buffer with zero lines then there is no difference
        // any longer.  Happens when making a change (or undo) that removes
@@ -2436,24 +2534,12 @@ diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
        // updating the window.  Just report the text as unchanged.  Other
        // windows might still show the change though.
        if (zero == FALSE)
-           return 0;
-       return -2;
+           return num_fill;
+       if (linestatus)
+           *linestatus = -2;
+       return num_fill;
     }
-
-    // If 'diffopt' doesn't contain "filler", return 0.
-    if (!(diff_flags & DIFF_FILLER))
-       return 0;
-
-    // Insert filler lines above the line just below the change.  Will return
-    // 0 when this buf had the max count.
-    maxcount = get_max_diff_length(dp);
-    return maxcount - dp->df_count[idx];
-}
-
-    int
-diff_check(win_T *wp, linenr_T lnum)
-{
-    return diff_check_with_linestatus(wp, lnum, NULL);
+    return num_fill;
 }
 
 /*
@@ -2578,7 +2664,7 @@ diff_check_fill(win_T *wp, linenr_T lnum)
     // be quick when there are no filler lines
     if (!(diff_flags & DIFF_FILLER))
        return 0;
-    n = diff_check(wp, lnum);
+    n = diff_check_with_linestatus(wp, lnum, NULL);
     if (n <= 0)
        return 0;
     return n;
@@ -2596,8 +2682,6 @@ diff_set_topline(win_T *fromwin, win_T *towin)
     int                fromidx;
     int                toidx;
     diff_T     *dp;
-    int                max_count;
-    int                i;
 
     fromidx = diff_buf_idx(frombuf);
     if (fromidx == DB_COUNT)
@@ -2629,66 +2713,11 @@ diff_set_topline(win_T *fromwin, win_T *towin)
        towin->w_topline = lnum + (dp->df_lnum[toidx] - dp->df_lnum[fromidx]);
        if (lnum >= dp->df_lnum[fromidx])
        {
-           if (dp->is_linematched)
-           {
-               calculate_topfill_and_topline(fromidx, toidx,
-                                               fromwin->w_topline,
-                                               fromwin->w_topfill,
-                                               &towin->w_topfill,
-                                               &towin->w_topline);
-           }
-           else
-           {
-               // Inside a change: compute filler lines. With three or more
-               // buffers we need to know the largest count.
-               max_count = 0;
-               for (i = 0; i < DB_COUNT; ++i)
-                   if (curtab->tp_diffbuf[i] != NULL
-                                                  && max_count < dp->df_count[i])
-                       max_count = dp->df_count[i];
-
-               if (dp->df_count[toidx] == dp->df_count[fromidx])
-               {
-                   // same number of lines: use same filler count
-                   towin->w_topfill = fromwin->w_topfill;
-               }
-               else if (dp->df_count[toidx] > dp->df_count[fromidx])
-               {
-                   if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx])
-                   {
-                       // more lines in towin and fromwin doesn't show diff
-                       // lines, only filler lines
-                       if (max_count - fromwin->w_topfill >= dp->df_count[toidx])
-                       {
-                           // towin also only shows filler lines
-                           towin->w_topline = dp->df_lnum[toidx]
-                                                          + dp->df_count[toidx];
-                           towin->w_topfill = fromwin->w_topfill;
-                       }
-                       else
-                           // towin still has some diff lines to show
-                           towin->w_topline = dp->df_lnum[toidx]
-                                                + max_count - fromwin->w_topfill;
-                   }
-               }
-               else if (towin->w_topline >= dp->df_lnum[toidx]
-                                                           + dp->df_count[toidx])
-               {
-                   // less lines in towin and no diff lines to show: compute
-                   // filler lines
-                   towin->w_topline = dp->df_lnum[toidx] + dp->df_count[toidx];
-                   if (diff_flags & DIFF_FILLER)
-                   {
-                       if (lnum == dp->df_lnum[fromidx] + dp->df_count[fromidx])
-                           // fromwin is also out of diff lines
-                           towin->w_topfill = fromwin->w_topfill;
-                       else
-                           // fromwin has some diff lines
-                           towin->w_topfill = dp->df_lnum[fromidx] +
-                                                       max_count - lnum;
-                   }
-               }
-           }
+           calculate_topfill_and_topline(fromidx, toidx,
+                                           fromwin->w_topline,
+                                           fromwin->w_topfill,
+                                           &towin->w_topfill,
+                                           &towin->w_topline);
        }
     }
 
@@ -2716,6 +2745,100 @@ diff_set_topline(win_T *fromwin, win_T *towin)
 #endif
 }
 
+/*
+ * Parse the diff anchors. If "check_only" is set, will only make sure the
+ * syntax is correct.
+ */
+    static int
+parse_diffanchors(int check_only, buf_T *buf, linenr_T *anchors, int *num_anchors)
+{
+    int i;
+    char_u *dia = (*buf->b_p_dia == NUL) ? p_dia : buf->b_p_dia;
+
+    buf_T *orig_curbuf = curbuf;
+    win_T *orig_curwin = curwin;
+
+    win_T *bufwin = NULL;
+    if (check_only)
+       bufwin = curwin;
+    else
+    {
+       // Find the first window tied to this buffer and ignore the rest. Will
+       // only matter for window-specific addresses like `.` or `''`.
+       FOR_ALL_WINDOWS(bufwin)
+           if (bufwin->w_buffer == buf && bufwin->w_p_diff)
+               break;
+       if (bufwin == NULL)
+           return FAIL; // should not really happen
+    }
+
+    for (i = 0; i < MAX_DIFF_ANCHORS && *dia != NUL; i++)
+    {
+       if (*dia == ',') // don't allow empty values
+           return FAIL;
+
+       curbuf = buf;
+       curwin = bufwin;
+       linenr_T lnum = get_address(NULL, &dia, ADDR_LINES, check_only, TRUE, FALSE, 1);
+       curbuf = orig_curbuf;
+       curwin = orig_curwin;
+
+       if (dia == NULL) // error detected
+           return FAIL;
+       if (*dia != ',' && *dia != NUL)
+           return FAIL;
+
+       if (!check_only
+               && (lnum == MAXLNUM || lnum <= 0 || lnum > buf->b_ml.ml_line_count + 1))
+       {
+           emsg(_(e_invalid_range));
+           return FAIL;
+       }
+
+       if (anchors != NULL)
+           anchors[i] = lnum;
+
+       if (*dia == ',')
+           dia++;
+    }
+    if (i == MAX_DIFF_ANCHORS && *dia != NUL)
+    {
+       semsg(_(e_cannot_have_more_than_nr_diff_anchors), MAX_DIFF_ANCHORS);
+       return FAIL;
+    }
+    if (num_anchors != NULL)
+       *num_anchors = i;
+    return OK;
+}
+
+/*
+ * This is called when 'diffanchors' is changed.
+ */
+    int
+diffanchors_changed(int buflocal)
+{
+    int result = parse_diffanchors(TRUE, curbuf, NULL, NULL);
+    if (result == OK && (diff_flags & DIFF_ANCHOR))
+    {
+       tabpage_T       *tp;
+       FOR_ALL_TABPAGES(tp)
+       {
+           if (!buflocal)
+               tp->tp_diff_invalid = TRUE;
+           else
+           {
+               for (int idx = 0; idx < DB_COUNT; ++idx)
+                   if (tp->tp_diffbuf[idx] == curbuf)
+                   {
+                       tp->tp_diff_invalid = TRUE;
+                       break;
+                   }
+           }
+       }
+    }
+    return result;
+}
+
 /*
  * This is called when 'diffopt' is changed.
  */
@@ -2740,6 +2863,11 @@ diffopt_changed(void)
            p += 6;
            diff_flags_new |= DIFF_FILLER;
        }
+       else if (STRNCMP(p, "anchor", 6) == 0)
+       {
+           p += 6;
+           diff_flags_new |= DIFF_ANCHOR;
+       }
        else if (STRNCMP(p, "context:", 8) == 0 && VIM_ISDIGIT(p[8]))
        {
            p += 8;
@@ -2873,6 +3001,9 @@ diffopt_changed(void)
            p += 10;
            linematch_lines_new = getdigits(&p);
            diff_flags_new |= DIFF_LINEMATCH;
+
+           // linematch does not make sense without filler set
+           diff_flags_new |= DIFF_FILLER;
        }
 
        if (*p != ',' && *p != NUL)
@@ -3574,15 +3705,8 @@ diff_find_change(
 
     // search for a change that includes "lnum" in the list of diffblocks.
     FOR_ALL_DIFFBLOCKS_IN_TAB(curtab, dp)
-       if (lnum <= dp->df_lnum[idx] + dp->df_count[idx])
+       if (lnum < dp->df_lnum[idx] + dp->df_count[idx])
            break;
-    if (dp->is_linematched)
-    {
-       while (dp && dp->df_next
-                       && lnum == dp->df_count[idx] + dp->df_lnum[idx]
-                       && dp->df_next->df_lnum[idx] == lnum)
-           dp = dp->df_next;
-    }
     if (dp == NULL || diff_check_sanity(curtab, dp) == FAIL)
        return FALSE;
 
@@ -3923,9 +4047,11 @@ ex_diffgetput(exarg_T *eap)
     {
        if (!eap->addr_count)
        {
-           // handle the case with adjacent diff blocks
-           while (dp->is_linematched
-                   && dp->df_next
+           // Handle the case with adjacent diff blocks (e.g. using linematch
+           // or anchors) at/above the cursor. Since a range wasn't specified,
+           // we just want to grab one diff block rather than all of them in
+           // the vicinity.
+           while (dp->df_next
                    && dp->df_next->df_lnum[idx_cur] == dp->df_lnum[idx_cur] +
                                                        dp->df_count[idx_cur]
                    && dp->df_next->df_lnum[idx_cur] == eap->line1 + off + 1)
@@ -4548,7 +4674,6 @@ f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
     static int         change_end = 0;
     static hlf_T       hlID = (hlf_T)0;
     int                        cache_results = TRUE;
-    int                        filler_lines;
     int                        col;
     diffline_T         diffline;
 
@@ -4578,10 +4703,10 @@ f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
     {
        // New line, buffer, change: need to get the values.
        int linestatus = 0;
-       filler_lines = diff_check_with_linestatus(curwin, lnum, &linestatus);
-       if (filler_lines < 0 || linestatus < 0)
+       diff_check_with_linestatus(curwin, lnum, &linestatus);
+       if (linestatus < 0)
        {
-           if (filler_lines == -1 || linestatus == -1)
+           if (linestatus == -1)
            {
                change_start = MAXCOL;
                change_end = -1;
index 2388193b97820f4b6fff2dd56b480882204b24d7..3e6958e00fc7de5d4aadbb9cc99ef9866716102b 100644 (file)
@@ -1476,9 +1476,9 @@ win_line(
 
     CLEAR_FIELD(line_changes);
 
-    if (wlv.filler_lines < 0 || linestatus < 0)
+    if (linestatus < 0)
     {
-       if (wlv.filler_lines == -1 || linestatus == -1)
+       if (linestatus == -1)
        {
            if (diff_find_change(wp, lnum, &line_changes))
            {
@@ -1509,9 +1509,6 @@ win_line(
        else
            wlv.diff_hlf = HLF_ADD;
 
-       if (linestatus == 0)
-           wlv.filler_lines = 0;
-
        area_highlighting = TRUE;
     }
 
index fd644201cca4bb5ff2d1e598d0da4b5c0a049c6e..0776d7146537ae574c3f4b632178305b1c71d37e 100644 (file)
@@ -3736,3 +3736,9 @@ EXTERN char e_cannot_not_support_redrawtabpanel[]
 EXTERN char e_wayland_connection_unavailable[]
        INIT(= N_("E1548: Wayland connection is unavailable"));
 #endif
+#if defined(FEAT_DIFF)
+EXTERN char e_cannot_have_more_than_nr_diff_anchors[]
+       INIT(= N_("E1549: Cannot have more than %d diff anchors"));
+EXTERN char e_failed_to_find_all_diff_anchors[]
+       INIT(= N_("E1550: Failed to find all diff anchors"));
+#endif
index b985e2ba2bb8a5d856822b9579feab000f22d445..06f8f8b795e2668c7eb732f15d00564b2c87bdd6 100644 (file)
@@ -66,7 +66,6 @@ static int    getargopt(exarg_T *eap);
 #endif
 
 static linenr_T default_address(exarg_T *eap);
-static linenr_T get_address(exarg_T *, char_u **, cmd_addr_T addr_type, int skip, int silent, int to_other_file, int address_count);
 static void address_default_all(exarg_T *eap);
 static void    get_flags(exarg_T *eap);
 #if !defined(FEAT_PERL) \
@@ -4358,7 +4357,7 @@ default_address(exarg_T *eap)
  *
  * Return MAXLNUM when no Ex address was found.
  */
-    static linenr_T
+    linenr_T
 get_address(
     exarg_T    *eap UNUSED,
     char_u     **ptr,
@@ -4552,7 +4551,7 @@ get_address(
                    else
                        curwin->w_cursor.col = 0;
                    searchcmdlen = 0;
-                   flags = silent ? 0 : SEARCH_HIS | SEARCH_MSG;
+                   flags = silent ? SEARCH_KEEP : SEARCH_HIS | SEARCH_MSG;
                    if (!do_search(NULL, c, c, cmd, STRLEN(cmd), 1L, flags, NULL))
                    {
                        curwin->w_cursor = pos;
index dcb6cbe1478fd74155f0b259b83475fa11fe9f51..6d6265e5d72137a1b968107c48314a9ea0fd3988 100644 (file)
@@ -2057,7 +2057,7 @@ retnomove:
            for (first = TRUE; curwin->w_topline > 1; )
            {
 #ifdef FEAT_DIFF
-               if (curwin->w_topfill < diff_check(curwin, curwin->w_topline))
+               if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline))
                    ++count;
                else
 #endif
@@ -2069,7 +2069,7 @@ retnomove:
                (void)hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
 #endif
 #ifdef FEAT_DIFF
-               if (curwin->w_topfill < diff_check(curwin, curwin->w_topline))
+               if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline))
                    ++curwin->w_topfill;
                else
 #endif
index d27114f13c9f20d1d18f83ea8ef9357c2d4cac92..e6e78c07275dfb66d1bfce2a8cb2349ba22cab80 100644 (file)
@@ -1783,7 +1783,7 @@ scrolldown(
     for (int todo = line_count; todo > 0; --todo)
     {
 #ifdef FEAT_DIFF
-       if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)
+       if (curwin->w_topfill < diff_check_fill(curwin, curwin->w_topline)
                && curwin->w_topfill < curwin->w_height - 1)
        {
            ++curwin->w_topfill;
index e1cf29ecf3156841d1caf2c61a0ff8757813a3eb..a7d87f37b64fb290e4b4e0dc8e48d59200da8d28 100644 (file)
@@ -6462,6 +6462,11 @@ unset_global_local_option(char_u *name, void *from)
        case PV_DICT:
            clear_string_option(&buf->b_p_dict);
            break;
+# ifdef FEAT_DIFF
+       case PV_DIA:
+           clear_string_option(&buf->b_p_dia);
+           break;
+# endif
        case PV_TSR:
            clear_string_option(&buf->b_p_tsr);
            break;
@@ -6583,6 +6588,9 @@ get_varp_scope(struct vimoption *p, int scope)
            case PV_COT:  return (char_u *)&(curbuf->b_p_cot);
            case PV_ISE:  return (char_u *)&(curbuf->b_p_ise);
            case PV_DICT: return (char_u *)&(curbuf->b_p_dict);
+#ifdef FEAT_DIFF
+           case PV_DIA:  return (char_u *)&(curbuf->b_p_dia);
+#endif
            case PV_TSR:  return (char_u *)&(curbuf->b_p_tsr);
 #ifdef FEAT_COMPL_FUNC
            case PV_TSRFU: return (char_u *)&(curbuf->b_p_tsrfu);
@@ -6668,6 +6676,10 @@ get_varp(struct vimoption *p)
                                    ? (char_u *)&(curbuf->b_p_ise) : p->var;
        case PV_DICT:   return *curbuf->b_p_dict != NUL
                                    ? (char_u *)&(curbuf->b_p_dict) : p->var;
+#ifdef FEAT_DIFF
+       case PV_DIA:    return *curbuf->b_p_dia != NUL
+                                   ? (char_u *)&(curbuf->b_p_dia) : p->var;
+#endif
        case PV_TSR:    return *curbuf->b_p_tsr != NUL
                                    ? (char_u *)&(curbuf->b_p_tsr) : p->var;
 #ifdef FEAT_COMPL_FUNC
@@ -7499,6 +7511,9 @@ buf_copy_options(buf_T *buf, int flags)
            buf->b_p_cot = empty_option;
            buf->b_cot_flags = 0;
            buf->b_p_dict = empty_option;
+#ifdef FEAT_DIFF
+           buf->b_p_dia = empty_option;
+#endif
            buf->b_p_tsr = empty_option;
            buf->b_p_ise = empty_option;
 #ifdef FEAT_COMPL_FUNC
index c57539731daff83c26dd14c118307ddfc40b92fb..1706ac1a710d6bf3ef2bd0aa3114f93e77217f54 100644 (file)
@@ -571,6 +571,7 @@ EXTERN char_u       *p_def;         // 'define'
 EXTERN char_u  *p_inc;
 #endif
 #ifdef FEAT_DIFF
+EXTERN char_u  *p_dia;         // 'diffanchors'
 EXTERN char_u  *p_dip;         // 'diffopt'
 # ifdef FEAT_EVAL
 EXTERN char_u  *p_dex;         // 'diffexpr'
@@ -1189,6 +1190,9 @@ enum
     , BV_COT
     , BV_CPT
     , BV_DICT
+#ifdef FEAT_DIFF
+    , BV_DIA
+#endif
     , BV_TSR
 #ifdef BACKSLASH_IN_FILENAME
     , BV_CSL
index aae285ca75aebffbd79d9171e206acf9fd605447..3144e2330e601ffbd1d4bed342101811a6b989e4 100644 (file)
@@ -54,6 +54,9 @@
 #define PV_COT         OPT_BOTH(OPT_BUF(BV_COT))
 #define PV_CPT         OPT_BUF(BV_CPT)
 #define PV_DICT                OPT_BOTH(OPT_BUF(BV_DICT))
+#ifdef FEAT_DIFF
+# define PV_DIA                OPT_BOTH(OPT_BUF(BV_DIA))
+#endif
 #define PV_TSR         OPT_BOTH(OPT_BUF(BV_TSR))
 #define PV_FFU         OPT_BOTH(OPT_BUF(BV_FFU))
 #define PV_CSL         OPT_BUF(BV_CSL)
@@ -859,6 +862,13 @@ static struct vimoption options[] =
                            (char_u *)NULL, PV_NONE, NULL, NULL,
 #endif
                            {(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
+    {"diffanchors", "dia",  P_STRING|P_VI_DEF|P_ONECOMMA,
+#ifdef FEAT_DIFF
+                           (char_u *)&p_dia, PV_DIA, did_set_diffanchors, NULL,
+#else
+                           (char_u *)NULL, PV_NONE, NULL, NULL,
+#endif
+                           {(char_u *)"", (char_u *)NULL} SCTX_INIT},
     {"diffexpr",    "dex",  P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
 #if defined(FEAT_DIFF) && defined(FEAT_EVAL)
                            (char_u *)&p_dex, PV_NONE, did_set_optexpr, NULL,
index eb0b9d313a736a198b39951a9ecc8a2413894712..4c363e5750acdc86e59cf9b5560f41b084af886d 100644 (file)
@@ -35,7 +35,7 @@ static char *(p_tplo_align_values[]) = {"left", "right", NULL};
 #endif
 #if defined(FEAT_DIFF)
 // Note: Keep this in sync with diffopt_changed()
-static char *(p_dip_values[]) = {"filler", "context:", "iblank", "icase", "iwhite", "iwhiteall", "iwhiteeol", "horizontal", "vertical", "closeoff", "hiddenoff", "foldcolumn:", "followwrap", "internal", "indent-heuristic", "algorithm:", "inline:", "linematch:", NULL};
+static char *(p_dip_values[]) = {"filler", "anchor", "context:", "iblank", "icase", "iwhite", "iwhiteall", "iwhiteeol", "horizontal", "vertical", "closeoff", "hiddenoff", "foldcolumn:", "followwrap", "internal", "indent-heuristic", "algorithm:", "inline:", "linematch:", NULL};
 static char *(p_dip_algorithm_values[]) = {"myers", "minimal", "patience", "histogram", NULL};
 static char *(p_dip_inline_values[]) = {"none", "simple", "char", "word", NULL};
 #endif
@@ -341,6 +341,9 @@ check_buf_options(buf_T *buf)
     check_string_option(&buf->b_p_tags);
     check_string_option(&buf->b_p_tc);
     check_string_option(&buf->b_p_dict);
+#ifdef FEAT_DIFF
+    check_string_option(&buf->b_p_dia);
+#endif
     check_string_option(&buf->b_p_tsr);
     check_string_option(&buf->b_p_lw);
     check_string_option(&buf->b_p_bkc);
@@ -2047,6 +2050,18 @@ expand_set_debug(optexpand_T *args, int *numMatches, char_u ***matches)
 }
 
 #if defined(FEAT_DIFF) || defined(PROTO)
+/*
+ * The 'diffanchors' option is changed.
+ */
+    char *
+did_set_diffanchors(optset_T *args)
+{
+    if (diffanchors_changed(args->os_flags & OPT_LOCAL) == FAIL)
+       return e_invalid_argument;
+
+    return NULL;
+}
+
 /*
  * The 'diffopt' option is changed.
  */
index 55da0b7127afc8624cd000d6d9edc14c986b232a..f64ae7dfdf2761fb2c3871b1bca4ce3fe99dec34 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2025-07-16 20:09+0200\n"
+"POT-Creation-Date: 2025-07-16 20:35+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -117,116 +117,116 @@ msgstr[1] ""
 msgid "W14: Warning: List of file names overflow"
 msgstr ""
 
-#: ../buffer.c:3501
+#: ../buffer.c:3504
 #, c-format
 msgid "line %ld"
 msgstr ""
 
-#: ../buffer.c:3920
+#: ../buffer.c:3923
 msgid " [Modified]"
 msgstr ""
 
-#: ../buffer.c:3922
+#: ../buffer.c:3925
 msgid "[Not edited]"
 msgstr ""
 
-#: ../buffer.c:3925
+#: ../buffer.c:3928
 msgid "[Read errors]"
 msgstr ""
 
-#: ../buffer.c:3926 ../buffer.c:4983 ../drawscreen.c:503 ../fileio.c:2526
+#: ../buffer.c:3929 ../buffer.c:4986 ../drawscreen.c:503 ../fileio.c:2526
 #: ../netbeans.c:3425
 msgid "[RO]"
 msgstr ""
 
-#: ../buffer.c:3926 ../fileio.c:2526 ../netbeans.c:3425
+#: ../buffer.c:3929 ../fileio.c:2526 ../netbeans.c:3425
 msgid "[readonly]"
 msgstr ""
 
-#: ../buffer.c:3938
+#: ../buffer.c:3941
 #, c-format
 msgid "%ld line --%d%%--"
 msgid_plural "%ld lines --%d%%--"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../buffer.c:3946
+#: ../buffer.c:3949
 #, c-format
 msgid "line %ld of %ld --%d%%-- col "
 msgstr ""
 
-#: ../buffer.c:4067 ../buffer.c:6118 ../memline.c:2274
+#: ../buffer.c:4070 ../buffer.c:6121 ../memline.c:2274
 msgid "[No Name]"
 msgstr ""
 
-#: ../buffer.c:4156
+#: ../buffer.c:4159
 msgid "help"
 msgstr ""
 
-#: ../buffer.c:4991 ../drawscreen.c:495
+#: ../buffer.c:4994 ../drawscreen.c:495
 msgid "[Help]"
 msgstr ""
 
-#: ../buffer.c:5025 ../drawscreen.c:498
+#: ../buffer.c:5028 ../drawscreen.c:498
 msgid "[Preview]"
 msgstr ""
 
-#: ../buffer.c:5408
+#: ../buffer.c:5411
 msgid "All"
 msgstr ""
 
-#: ../buffer.c:5408
+#: ../buffer.c:5411
 msgid "Bot"
 msgstr ""
 
-#: ../buffer.c:5412
+#: ../buffer.c:5415
 msgid "Top"
 msgstr ""
 
 #. localized percentage value
-#: ../buffer.c:5417
+#: ../buffer.c:5420
 #, c-format
 msgid "%d%%"
 msgstr ""
 
-#: ../buffer.c:5418
+#: ../buffer.c:5421
 #, c-format
 msgid "%2s"
 msgstr ""
 
-#: ../buffer.c:5438
+#: ../buffer.c:5441
 #, c-format
 msgid " (%d of %d)"
 msgstr ""
 
-#: ../buffer.c:5439
+#: ../buffer.c:5442
 #, c-format
 msgid " ((%d) of %d)"
 msgstr ""
 
-#: ../buffer.c:5440
+#: ../buffer.c:5443
 #, c-format
 msgid " (file %d of %d)"
 msgstr ""
 
-#: ../buffer.c:5441
+#: ../buffer.c:5444
 #, c-format
 msgid " (file (%d) of %d)"
 msgstr ""
 
-#: ../buffer.c:6094
+#: ../buffer.c:6097
 msgid "[Command Line]"
 msgstr ""
 
-#: ../buffer.c:6097
+#: ../buffer.c:6100
 msgid "[Prompt]"
 msgstr ""
 
-#: ../buffer.c:6101
+#: ../buffer.c:6104
 msgid "[Popup]"
 msgstr ""
 
-#: ../buffer.c:6103
+#: ../buffer.c:6106
 msgid "[Scratch]"
 msgstr ""
 
@@ -420,7 +420,7 @@ msgstr ""
 msgid "Newval = \"%s\""
 msgstr ""
 
-#: ../debugger.c:112 ../debugger.c:398 ../ex_docmd.c:622
+#: ../debugger.c:112 ../debugger.c:398 ../ex_docmd.c:621
 #, c-format
 msgid "line %ld: %s"
 msgstr ""
@@ -462,12 +462,12 @@ msgstr ""
 msgid "extend() argument"
 msgstr ""
 
-#: ../diff.c:806
+#: ../diff.c:822
 #, c-format
 msgid "Not enough memory to use internal diff for buffer \"%s\""
 msgstr ""
 
-#: ../diff.c:1296
+#: ../diff.c:1418
 msgid "Patch file"
 msgstr ""
 
@@ -757,77 +757,77 @@ msgstr ""
 msgid "W21: Required python version 3.x not supported, ignoring file: %s"
 msgstr ""
 
-#: ../ex_docmd.c:544
+#: ../ex_docmd.c:543
 msgid "Entering Ex mode.  Type \"visual\" to go to Normal mode."
 msgstr ""
 
-#: ../ex_docmd.c:620
+#: ../ex_docmd.c:619
 #, c-format
 msgid "Executing: %s"
 msgstr ""
 
-#: ../ex_docmd.c:1357
+#: ../ex_docmd.c:1356
 msgid "End of sourced file"
 msgstr ""
 
-#: ../ex_docmd.c:1358
+#: ../ex_docmd.c:1357
 msgid "End of function"
 msgstr ""
 
-#: ../ex_docmd.c:2215
+#: ../ex_docmd.c:2214
 msgid "Backwards range given, OK to swap"
 msgstr ""
 
-#: ../ex_docmd.c:5962
+#: ../ex_docmd.c:5961
 #, c-format
 msgid "%d more file to edit.  Quit anyway?"
 msgid_plural "%d more files to edit.  Quit anyway?"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../ex_docmd.c:6017 ../globals.h:1724
+#: ../ex_docmd.c:6016 ../globals.h:1724
 msgid "unknown"
 msgstr ""
 
-#: ../ex_docmd.c:6037
+#: ../ex_docmd.c:6036
 msgid "Greetings, Vim user!"
 msgstr ""
 
-#: ../ex_docmd.c:6513
+#: ../ex_docmd.c:6512
 msgid "Already only one tab page"
 msgstr ""
 
-#: ../ex_docmd.c:7250
+#: ../ex_docmd.c:7249
 msgid "Edit File in new tab page"
 msgstr ""
 
-#: ../ex_docmd.c:7251
+#: ../ex_docmd.c:7250
 msgid "Edit File in new window"
 msgstr ""
 
-#: ../ex_docmd.c:7402
+#: ../ex_docmd.c:7401
 #, c-format
 msgid "Tab page %d"
 msgstr ""
 
-#: ../ex_docmd.c:7809
+#: ../ex_docmd.c:7808
 msgid "No swap file"
 msgstr ""
 
-#: ../ex_docmd.c:7913
+#: ../ex_docmd.c:7912
 msgid "Append File"
 msgstr ""
 
-#: ../ex_docmd.c:8422
+#: ../ex_docmd.c:8421
 #, c-format
 msgid "Window position: X %d, Y %d"
 msgstr ""
 
-#: ../ex_docmd.c:8820
+#: ../ex_docmd.c:8819
 msgid "Save Redirection"
 msgstr ""
 
-#: ../ex_docmd.c:10156
+#: ../ex_docmd.c:10155
 msgid "Untitled"
 msgstr ""
 
@@ -4257,327 +4257,327 @@ msgstr ""
 msgid "%s (%s, compiled %s)"
 msgstr ""
 
-#: ../version.c:4046
+#: ../version.c:4048
 msgid ""
 "\n"
 "MS-Windows ARM64 GUI/console version"
 msgstr ""
 
-#: ../version.c:4048
+#: ../version.c:4050
 msgid ""
 "\n"
 "MS-Windows 64-bit GUI/console version"
 msgstr ""
 
-#: ../version.c:4051
+#: ../version.c:4053
 msgid ""
 "\n"
 "MS-Windows 32-bit GUI/console version"
 msgstr ""
 
-#: ../version.c:4056
+#: ../version.c:4058
 msgid ""
 "\n"
 "MS-Windows ARM64 GUI version"
 msgstr ""
 
-#: ../version.c:4058
+#: ../version.c:4060
 msgid ""
 "\n"
 "MS-Windows 64-bit GUI version"
 msgstr ""
 
-#: ../version.c:4061
+#: ../version.c:4063
 msgid ""
 "\n"
 "MS-Windows 32-bit GUI version"
 msgstr ""
 
-#: ../version.c:4065
+#: ../version.c:4067
 msgid " with OLE support"
 msgstr ""
 
-#: ../version.c:4070
+#: ../version.c:4072
 msgid ""
 "\n"
 "MS-Windows ARM64 console version"
 msgstr ""
 
-#: ../version.c:4072
+#: ../version.c:4074
 msgid ""
 "\n"
 "MS-Windows 64-bit console version"
 msgstr ""
 
-#: ../version.c:4075
+#: ../version.c:4077
 msgid ""
 "\n"
 "MS-Windows 32-bit console version"
 msgstr ""
 
-#: ../version.c:4081
+#: ../version.c:4083
 msgid ""
 "\n"
 "macOS version"
 msgstr ""
 
-#: ../version.c:4083
+#: ../version.c:4085
 msgid ""
 "\n"
 "macOS version w/o darwin feat."
 msgstr ""
 
-#: ../version.c:4093
+#: ../version.c:4095
 msgid ""
 "\n"
 "OpenVMS version"
 msgstr ""
 
-#: ../version.c:4108
+#: ../version.c:4110
 msgid ""
 "\n"
 "Included patches: "
 msgstr ""
 
-#: ../version.c:4133
+#: ../version.c:4135
 msgid ""
 "\n"
 "Extra patches: "
 msgstr ""
 
-#: ../version.c:4145 ../version.c:4456
+#: ../version.c:4147 ../version.c:4458
 msgid "Modified by "
 msgstr ""
 
-#: ../version.c:4152
+#: ../version.c:4154
 msgid ""
 "\n"
 "Compiled "
 msgstr ""
 
-#: ../version.c:4155
+#: ../version.c:4157
 msgid "by "
 msgstr ""
 
-#: ../version.c:4167
+#: ../version.c:4169
 msgid ""
 "\n"
 "Huge version "
 msgstr ""
 
-#: ../version.c:4169
+#: ../version.c:4171
 msgid ""
 "\n"
 "Normal version "
 msgstr ""
 
-#: ../version.c:4171
+#: ../version.c:4173
 msgid ""
 "\n"
 "Tiny version "
 msgstr ""
 
-#: ../version.c:4174
+#: ../version.c:4176
 msgid "without GUI."
 msgstr ""
 
-#: ../version.c:4177
+#: ../version.c:4179
 msgid "with GTK3 GUI."
 msgstr ""
 
-#: ../version.c:4179
+#: ../version.c:4181
 msgid "with GTK2-GNOME GUI."
 msgstr ""
 
-#: ../version.c:4181
+#: ../version.c:4183
 msgid "with GTK2 GUI."
 msgstr ""
 
-#: ../version.c:4184
+#: ../version.c:4186
 msgid "with X11-Motif GUI."
 msgstr ""
 
-#: ../version.c:4186
+#: ../version.c:4188
 msgid "with Haiku GUI."
 msgstr ""
 
-#: ../version.c:4188
+#: ../version.c:4190
 msgid "with Photon GUI."
 msgstr ""
 
-#: ../version.c:4190
+#: ../version.c:4192
 msgid "with GUI."
 msgstr ""
 
-#: ../version.c:4192
+#: ../version.c:4194
 msgid "  Features included (+) or not (-):\n"
 msgstr ""
 
-#: ../version.c:4199
+#: ../version.c:4201
 msgid "   system vimrc file: \""
 msgstr ""
 
-#: ../version.c:4204
+#: ../version.c:4206
 msgid "     user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4209
+#: ../version.c:4211
 msgid " 2nd user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4214 ../version.c:4221 ../version.c:4225
+#: ../version.c:4216 ../version.c:4223 ../version.c:4227
 msgid " 3rd user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4217
+#: ../version.c:4219
 msgid " 4th user vimrc file: \""
 msgstr ""
 
-#: ../version.c:4230
+#: ../version.c:4232
 msgid "      user exrc file: \""
 msgstr ""
 
-#: ../version.c:4235
+#: ../version.c:4237
 msgid "  2nd user exrc file: \""
 msgstr ""
 
-#: ../version.c:4241
+#: ../version.c:4243
 msgid "  system gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4245
+#: ../version.c:4247
 msgid "    user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4249
+#: ../version.c:4251
 msgid "2nd user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4254
+#: ../version.c:4256
 msgid "3rd user gvimrc file: \""
 msgstr ""
 
-#: ../version.c:4259
+#: ../version.c:4261
 msgid "       defaults file: \""
 msgstr ""
 
-#: ../version.c:4264
+#: ../version.c:4266
 msgid "    system menu file: \""
 msgstr ""
 
-#: ../version.c:4272
+#: ../version.c:4274
 msgid "  fall-back for $VIM: \""
 msgstr ""
 
-#: ../version.c:4278
+#: ../version.c:4280
 msgid " f-b for $VIMRUNTIME: \""
 msgstr ""
 
-#: ../version.c:4282
+#: ../version.c:4284
 msgid "Compilation: "
 msgstr ""
 
-#: ../version.c:4288
+#: ../version.c:4290
 msgid "Compiler: "
 msgstr ""
 
-#: ../version.c:4293
+#: ../version.c:4295
 msgid "Linking: "
 msgstr ""
 
-#: ../version.c:4298
+#: ../version.c:4300
 msgid "  DEBUG BUILD"
 msgstr ""
 
-#: ../version.c:4334
+#: ../version.c:4336
 msgid "VIM - Vi IMproved"
 msgstr ""
 
-#: ../version.c:4336
+#: ../version.c:4338
 msgid "version "
 msgstr ""
 
-#: ../version.c:4337
+#: ../version.c:4339
 msgid "by Bram Moolenaar et al."
 msgstr ""
 
-#: ../version.c:4341
+#: ../version.c:4343
 msgid "Vim is open source and freely distributable"
 msgstr ""
 
-#: ../version.c:4343
+#: ../version.c:4345
 msgid "Help poor children in Uganda!"
 msgstr ""
 
-#: ../version.c:4344
+#: ../version.c:4346
 msgid "type  :help iccf<Enter>       for information "
 msgstr ""
 
-#: ../version.c:4346
+#: ../version.c:4348
 msgid "type  :q<Enter>               to exit         "
 msgstr ""
 
-#: ../version.c:4347
+#: ../version.c:4349
 msgid "type  :help<Enter>  or  <F1>  for on-line help"
 msgstr ""
 
-#: ../version.c:4348
+#: ../version.c:4350
 msgid "type  :help version9<Enter>   for version info"
 msgstr ""
 
-#: ../version.c:4351
+#: ../version.c:4353
 msgid "Running in Vi compatible mode"
 msgstr ""
 
-#: ../version.c:4352
+#: ../version.c:4354
 msgid "type  :set nocp<Enter>        for Vim defaults"
 msgstr ""
 
-#: ../version.c:4353
+#: ../version.c:4355
 msgid "type  :help cp-default<Enter> for info on this"
 msgstr ""
 
-#: ../version.c:4368
+#: ../version.c:4370
 msgid "menu  Help->Orphans           for information    "
 msgstr ""
 
-#: ../version.c:4370
+#: ../version.c:4372
 msgid "Running modeless, typed text is inserted"
 msgstr ""
 
-#: ../version.c:4371
+#: ../version.c:4373
 msgid "menu  Edit->Global Settings->Toggle Insert Mode  "
 msgstr ""
 
-#: ../version.c:4372
+#: ../version.c:4374
 msgid "                              for two modes      "
 msgstr ""
 
-#: ../version.c:4376
+#: ../version.c:4378
 msgid "menu  Edit->Global Settings->Toggle Vi Compatible"
 msgstr ""
 
-#: ../version.c:4377
+#: ../version.c:4379
 msgid "                              for Vim defaults   "
 msgstr ""
 
-#: ../version.c:4418
+#: ../version.c:4420
 msgid "Sponsor Vim development!"
 msgstr ""
 
-#: ../version.c:4419
+#: ../version.c:4421
 msgid "Become a registered Vim user!"
 msgstr ""
 
-#: ../version.c:4422
+#: ../version.c:4424
 msgid "type  :help sponsor<Enter>    for information "
 msgstr ""
 
-#: ../version.c:4423
+#: ../version.c:4425
 msgid "type  :help register<Enter>   for information "
 msgstr ""
 
-#: ../version.c:4425
+#: ../version.c:4427
 msgid "menu  Help->Sponsor/Register  for information    "
 msgstr ""
 
@@ -11213,6 +11213,15 @@ msgstr ""
 msgid "E1548: Wayland connection is unavailable"
 msgstr ""
 
+#: ../errors.h:3741
+#, c-format
+msgid "E1549: Cannot have more than %d diff anchors"
+msgstr ""
+
+#: ../errors.h:3743
+msgid "E1550: Failed to find all diff anchors"
+msgstr ""
+
 #. type of cmdline window or 0
 #. result of cmdline window or 0
 #. buffer of cmdline window or NULL
@@ -12931,638 +12940,642 @@ msgid "expression used to obtain a diff file"
 msgstr ""
 
 #: ../../runtime/optwin.vim:1059
+msgid "list of addresses for syncing of a diff"
+msgstr ""
+
+#: ../../runtime/optwin.vim:1062
 msgid "expression used to patch a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1064
+#: ../../runtime/optwin.vim:1067
 msgid "mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1065
+#: ../../runtime/optwin.vim:1068
 msgid "maximum depth of mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1067
+#: ../../runtime/optwin.vim:1070
 msgid "recognize mappings in mapped keys"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1069
+#: ../../runtime/optwin.vim:1072
 msgid "allow timing out halfway into a mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1071
+#: ../../runtime/optwin.vim:1074
 msgid "allow timing out halfway into a key code"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1073
+#: ../../runtime/optwin.vim:1076
 msgid "time in msec for 'timeout'"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1075
+#: ../../runtime/optwin.vim:1078
 msgid "time in msec for 'ttimeout'"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1079
+#: ../../runtime/optwin.vim:1082
 msgid "reading and writing files"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1080
+#: ../../runtime/optwin.vim:1083
 msgid "enable using settings from modelines when reading a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1083
+#: ../../runtime/optwin.vim:1086
 msgid "allow setting expression options from a modeline"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1085
+#: ../../runtime/optwin.vim:1088
 msgid "number of lines to check for modelines"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1087
+#: ../../runtime/optwin.vim:1090
 msgid "binary file editing"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1090
+#: ../../runtime/optwin.vim:1093
 msgid "last line in the file has an end-of-line"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1093
+#: ../../runtime/optwin.vim:1096
 msgid "last line in the file followed by CTRL-Z"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1096
+#: ../../runtime/optwin.vim:1099
 msgid "fixes missing end-of-line at end of text file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1099
+#: ../../runtime/optwin.vim:1102
 msgid "prepend a Byte Order Mark to the file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1102
+#: ../../runtime/optwin.vim:1105
 msgid "end-of-line format: \"dos\", \"unix\" or \"mac\""
 msgstr ""
 
-#: ../../runtime/optwin.vim:1105
+#: ../../runtime/optwin.vim:1108
 msgid "list of file formats to look for when editing a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1107
+#: ../../runtime/optwin.vim:1110
 msgid "obsolete, use 'fileformat'"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1110
+#: ../../runtime/optwin.vim:1113
 msgid "obsolete, use 'fileformats'"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1112
+#: ../../runtime/optwin.vim:1115
 msgid "writing files is allowed"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1114
+#: ../../runtime/optwin.vim:1117
 msgid "write a backup file before overwriting a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1116
+#: ../../runtime/optwin.vim:1119
 msgid "keep a backup after overwriting a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1118
+#: ../../runtime/optwin.vim:1121
 msgid "patterns that specify for which files a backup is not made"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1120
+#: ../../runtime/optwin.vim:1123
 msgid "whether to make the backup as a copy or rename the existing file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1123
+#: ../../runtime/optwin.vim:1126
 msgid "list of directories to put backup files in"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1125
+#: ../../runtime/optwin.vim:1128
 msgid "file name extension for the backup file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1127
+#: ../../runtime/optwin.vim:1130
 msgid "automatically write a file when leaving a modified buffer"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1129
+#: ../../runtime/optwin.vim:1132
 msgid "as 'autowrite', but works with more commands"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1131
+#: ../../runtime/optwin.vim:1134
 msgid "always write without asking for confirmation"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1133
+#: ../../runtime/optwin.vim:1136
 msgid "automatically read a file when it was modified outside of Vim"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1136
+#: ../../runtime/optwin.vim:1139
 msgid "keep oldest version of a file; specifies file name extension"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1138
+#: ../../runtime/optwin.vim:1141
 msgid "forcibly sync the file to disk after writing it"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1140
+#: ../../runtime/optwin.vim:1143
 msgid "use 8.3 file names"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1143
+#: ../../runtime/optwin.vim:1146
 msgid "encryption method for file writing: zip, blowfish or blowfish2"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1148
+#: ../../runtime/optwin.vim:1151
 msgid "the swap file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1149
+#: ../../runtime/optwin.vim:1152
 msgid "list of directories for the swap file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1151
+#: ../../runtime/optwin.vim:1154
 msgid "use a swap file for this buffer"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1154
+#: ../../runtime/optwin.vim:1157
 msgid "\"sync\", \"fsync\" or empty; how to flush a swap file to disk"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1156
+#: ../../runtime/optwin.vim:1159
 msgid "number of characters typed to cause a swap file update"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1158
+#: ../../runtime/optwin.vim:1161
 msgid "time in msec after which the swap file will be updated"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1160
+#: ../../runtime/optwin.vim:1163
 msgid "maximum amount of memory in Kbyte used for one buffer"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1162
+#: ../../runtime/optwin.vim:1165
 msgid "maximum amount of memory in Kbyte used for all buffers"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1166
+#: ../../runtime/optwin.vim:1169
 msgid "command line editing"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1167
+#: ../../runtime/optwin.vim:1170
 msgid "how many command lines are remembered"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1169
+#: ../../runtime/optwin.vim:1172
 msgid "key that triggers command-line expansion"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1171
+#: ../../runtime/optwin.vim:1174
 msgid "like 'wildchar' but can also be used in a mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1173
+#: ../../runtime/optwin.vim:1176
 msgid "specifies how command line completion works"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1176
+#: ../../runtime/optwin.vim:1179
 msgid "empty or \"tagfile\" to list file name of matching tags"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1179
+#: ../../runtime/optwin.vim:1182
 msgid "list of file name extensions that have a lower priority"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1182
+#: ../../runtime/optwin.vim:1185
 msgid "list of file name extensions added when searching for a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1187
+#: ../../runtime/optwin.vim:1190
 msgid "list of patterns to ignore files for file name completion"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1190
+#: ../../runtime/optwin.vim:1193
 msgid "ignore case when using file names"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1192
+#: ../../runtime/optwin.vim:1195
 msgid "ignore case when completing file names"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1195
+#: ../../runtime/optwin.vim:1198
 msgid "command-line completion shows a list of matches"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1198
+#: ../../runtime/optwin.vim:1201
 msgid "key used to open the command-line window"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1200
+#: ../../runtime/optwin.vim:1203
 msgid "height of the command-line window"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1204
+#: ../../runtime/optwin.vim:1207
 msgid "executing external commands"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1205
+#: ../../runtime/optwin.vim:1208
 msgid "name of the shell program used for external commands"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1208
+#: ../../runtime/optwin.vim:1211
 msgid "when to use the shell or directly execute a command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1211
+#: ../../runtime/optwin.vim:1214
 msgid "character(s) to enclose a shell command in"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1213
+#: ../../runtime/optwin.vim:1216
 msgid "like 'shellquote' but include the redirection"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1215
+#: ../../runtime/optwin.vim:1218
 msgid "characters to escape when 'shellxquote' is ("
 msgstr ""
 
-#: ../../runtime/optwin.vim:1217
+#: ../../runtime/optwin.vim:1220
 msgid "argument for 'shell' to execute a command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1219
+#: ../../runtime/optwin.vim:1222
 msgid "used to redirect command output to a file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1221
+#: ../../runtime/optwin.vim:1224
 msgid "use a temp file for shell commands instead of using a pipe"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1223
+#: ../../runtime/optwin.vim:1226
 msgid "program used for \"=\" command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1226
+#: ../../runtime/optwin.vim:1229
 msgid "program used to format lines with \"gq\" command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1228
+#: ../../runtime/optwin.vim:1231
 msgid "program used for the \"K\" command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1230
+#: ../../runtime/optwin.vim:1233
 msgid "warn when using a shell command and a buffer has changes"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1235
+#: ../../runtime/optwin.vim:1238
 msgid "running make and jumping to errors (quickfix)"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1236
+#: ../../runtime/optwin.vim:1239
 msgid "name of the file that contains error messages"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1238
+#: ../../runtime/optwin.vim:1241
 msgid "list of formats for error messages"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1241
+#: ../../runtime/optwin.vim:1244
 msgid "program used for the \":make\" command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1244
+#: ../../runtime/optwin.vim:1247
 msgid "string used to put the output of \":make\" in the error file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1246
+#: ../../runtime/optwin.vim:1249
 msgid "name of the errorfile for the 'makeprg' command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1248
+#: ../../runtime/optwin.vim:1251
 msgid "program used for the \":grep\" command"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1251
+#: ../../runtime/optwin.vim:1254
 msgid "list of formats for output of 'grepprg'"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1253
+#: ../../runtime/optwin.vim:1256
 msgid "encoding of the \":make\" and \":grep\" output"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1256
+#: ../../runtime/optwin.vim:1259
 msgid "function to display text in the quickfix window"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1262
+#: ../../runtime/optwin.vim:1265
 msgid "system specific"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1263
+#: ../../runtime/optwin.vim:1266
 msgid "use forward slashes in file names; for Unix-like shells"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1265
+#: ../../runtime/optwin.vim:1268
 msgid "specifies slash/backslash used for completion"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1270
+#: ../../runtime/optwin.vim:1273
 msgid "language specific"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1271
+#: ../../runtime/optwin.vim:1274
 msgid "specifies the characters in a file name"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1273
+#: ../../runtime/optwin.vim:1276
 msgid "specifies the characters in an identifier"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1275
+#: ../../runtime/optwin.vim:1278
 msgid "defines trigger strings for complete_match()"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1277
+#: ../../runtime/optwin.vim:1280
 msgid "specifies the characters in a keyword"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1280
+#: ../../runtime/optwin.vim:1283
 msgid "specifies printable characters"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1283
+#: ../../runtime/optwin.vim:1286
 msgid "specifies escape characters in a string"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1288
+#: ../../runtime/optwin.vim:1291
 msgid "display the buffer right-to-left"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1291
+#: ../../runtime/optwin.vim:1294
 msgid "when to edit the command-line right-to-left"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1294
+#: ../../runtime/optwin.vim:1297
 msgid "insert characters backwards"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1296
+#: ../../runtime/optwin.vim:1299
 msgid "allow CTRL-_ in Insert and Command-line mode to toggle 'revins'"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1298
+#: ../../runtime/optwin.vim:1301
 msgid "the ASCII code for the first letter of the Hebrew alphabet"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1300
+#: ../../runtime/optwin.vim:1303
 msgid "use Hebrew keyboard mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1302
+#: ../../runtime/optwin.vim:1305
 msgid "use phonetic Hebrew keyboard mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1306
+#: ../../runtime/optwin.vim:1309
 msgid "prepare for editing Arabic text"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1309
+#: ../../runtime/optwin.vim:1312
 msgid "perform shaping of Arabic characters"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1311
+#: ../../runtime/optwin.vim:1314
 msgid "terminal will perform bidi handling"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1315
+#: ../../runtime/optwin.vim:1318
 msgid "name of a keyboard mapping"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1319
+#: ../../runtime/optwin.vim:1322
 msgid "list of characters that are translated in Normal mode"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1321
+#: ../../runtime/optwin.vim:1324
 msgid "apply 'langmap' to mapped characters"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1325
+#: ../../runtime/optwin.vim:1328
 msgid "when set never use IM; overrules following IM options"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1328
+#: ../../runtime/optwin.vim:1331
 msgid "in Insert mode: 1: use :lmap; 2: use IM; 0: neither"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1331
+#: ../../runtime/optwin.vim:1334
 msgid "input method style, 0: on-the-spot, 1: over-the-spot"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1333
+#: ../../runtime/optwin.vim:1336
 msgid "entering a search pattern: 1: use :lmap; 2: use IM; 0: neither"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1337
+#: ../../runtime/optwin.vim:1340
 msgid "when set always use IM when starting to edit a command line"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1339
+#: ../../runtime/optwin.vim:1342
 msgid "function to obtain IME status"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1341
+#: ../../runtime/optwin.vim:1344
 msgid "function to enable/disable IME"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1346
+#: ../../runtime/optwin.vim:1349
 msgid "multi-byte characters"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1347
+#: ../../runtime/optwin.vim:1350
 msgid ""
 "character encoding used in Vim: \"latin1\", \"utf-8\",\n"
 "\"euc-jp\", \"big5\", etc."
 msgstr ""
 
-#: ../../runtime/optwin.vim:1349
+#: ../../runtime/optwin.vim:1352
 msgid "character encoding for the current file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1352
+#: ../../runtime/optwin.vim:1355
 msgid "automatically detected character encodings"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1354
+#: ../../runtime/optwin.vim:1357
 msgid "character encoding used by the terminal"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1356
+#: ../../runtime/optwin.vim:1359
 msgid "expression used for character encoding conversion"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1358
+#: ../../runtime/optwin.vim:1361
 msgid "delete combining (composing) characters on their own"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1360
+#: ../../runtime/optwin.vim:1363
 msgid "maximum number of combining (composing) characters displayed"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1363
+#: ../../runtime/optwin.vim:1366
 msgid "key that activates the X input method"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1366
+#: ../../runtime/optwin.vim:1369
 msgid "width of ambiguous width characters"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1368
+#: ../../runtime/optwin.vim:1371
 msgid "emoji characters are full width"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1372
+#: ../../runtime/optwin.vim:1375
 msgid "various"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1373
+#: ../../runtime/optwin.vim:1376
 msgid ""
 "when to use virtual editing: \"block\", \"insert\", \"all\"\n"
 "and/or \"onemore\""
 msgstr ""
 
-#: ../../runtime/optwin.vim:1375
+#: ../../runtime/optwin.vim:1378
 msgid "list of autocommand events which are to be ignored"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1377
+#: ../../runtime/optwin.vim:1380
 msgid "list of autocommand events which are to be ignored in a window"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1379
+#: ../../runtime/optwin.vim:1382
 msgid "load plugin scripts when starting up"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1381
+#: ../../runtime/optwin.vim:1384
 msgid "enable reading .vimrc/.exrc/.gvimrc in the current directory"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1383
+#: ../../runtime/optwin.vim:1386
 msgid "safer working with script files in the current directory"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1385
+#: ../../runtime/optwin.vim:1388
 msgid "use the 'g' flag for \":substitute\""
 msgstr ""
 
-#: ../../runtime/optwin.vim:1387
+#: ../../runtime/optwin.vim:1390
 msgid "'g' and 'c' flags of \":substitute\" toggle"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1390
+#: ../../runtime/optwin.vim:1393
 msgid "allow reading/writing devices"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1394
+#: ../../runtime/optwin.vim:1397
 msgid "maximum depth of function calls"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1398
+#: ../../runtime/optwin.vim:1401
 msgid "list of words that specifies what to put in a session file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1400
+#: ../../runtime/optwin.vim:1403
 msgid "list of words that specifies what to save for :mkview"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1402
+#: ../../runtime/optwin.vim:1405
 msgid "directory where to store files with :mkview"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1406
+#: ../../runtime/optwin.vim:1409
 msgid "list that specifies what to write in the viminfo file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1408
+#: ../../runtime/optwin.vim:1411
 msgid "file name used for the viminfo file"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1412
+#: ../../runtime/optwin.vim:1415
 msgid "what happens with a buffer when it's no longer in a window"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1415
+#: ../../runtime/optwin.vim:1418
 msgid "empty, \"nofile\", \"nowrite\", \"quickfix\", etc.: type of buffer"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1419
+#: ../../runtime/optwin.vim:1422
 msgid "whether the buffer shows up in the buffer list"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1422
+#: ../../runtime/optwin.vim:1425
 msgid "set to \"msg\" to see all error messages"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1425
+#: ../../runtime/optwin.vim:1428
 msgid "whether to show the signcolumn"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1430
+#: ../../runtime/optwin.vim:1433
 msgid "interval in milliseconds between polls for MzScheme threads"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1434
+#: ../../runtime/optwin.vim:1437
 msgid "name of the Lua dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1438
+#: ../../runtime/optwin.vim:1441
 msgid "name of the Perl dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1442
+#: ../../runtime/optwin.vim:1445
 msgid "whether to use Python 2 or 3"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1446
+#: ../../runtime/optwin.vim:1449
 msgid "name of the Python 2 dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1450
+#: ../../runtime/optwin.vim:1453
 msgid "name of the Python 2 home directory"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1454
+#: ../../runtime/optwin.vim:1457
 msgid "name of the Python 3 dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1458
+#: ../../runtime/optwin.vim:1461
 msgid "name of the Python 3 home directory"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1462
+#: ../../runtime/optwin.vim:1465
 msgid "name of the Ruby dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1466
+#: ../../runtime/optwin.vim:1469
 msgid "name of the Tcl dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1470
+#: ../../runtime/optwin.vim:1473
 msgid "name of the MzScheme dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1472
+#: ../../runtime/optwin.vim:1475
 msgid "name of the MzScheme GC dynamic library"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1476
+#: ../../runtime/optwin.vim:1479
 msgid "0, 1 or 2; when to use the tabpanel"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1478
+#: ../../runtime/optwin.vim:1481
 msgid "custom tab pages in tabpanel"
 msgstr ""
 
-#: ../../runtime/optwin.vim:1480
+#: ../../runtime/optwin.vim:1483
 msgid "options for using tabpanel"
 msgstr ""
 
index d4482b13e26dafd85a91ae23b26e952b707f3f23..b5c59e4a728799c9fa21e046050e441af4fbe1c4 100644 (file)
@@ -14,9 +14,9 @@ void diff_win_options(win_T *wp, int addbuf);
 void ex_diffoff(exarg_T *eap);
 void diff_clear(tabpage_T *tp);
 int diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus);
-int diff_check(win_T *wp, linenr_T lnum);
 int diff_check_fill(win_T *wp, linenr_T lnum);
 void diff_set_topline(win_T *fromwin, win_T *towin);
+int diffanchors_changed(int local);
 int diffopt_changed(void);
 int diffopt_horizontal(void);
 int diffopt_hiddenoff(void);
index 7b837c989e861ae919c3c0957db9b3bd3112131b..6d2961c01772b982e42f46a125efce97077c1589 100644 (file)
@@ -16,6 +16,7 @@ int cmdmod_error(int ignore_silent);
 void apply_cmdmod(cmdmod_T *cmod);
 void undo_cmdmod(cmdmod_T *cmod);
 int parse_cmd_address(exarg_T *eap, char **errormsg, int silent);
+linenr_T get_address(exarg_T *eap, char_u **ptr, cmd_addr_T addr_type, int skip, int silent, int to_other_file, int address_count);
 char_u *skip_option_env_lead(char_u *start);
 int number_method(char_u *cmd);
 char_u *find_ex_command(exarg_T *eap, int *full, int (*lookup)(char_u *, size_t, int cmd, cctx_T *), cctx_T *cctx);
index 2d5e17a5c5d22f019d6d194240a90ee5f56a95cf..9fb8af7e22a115294c835dfcf05def8f0e98ae21 100644 (file)
@@ -64,6 +64,7 @@ char *did_set_cursorlineopt(optset_T *args);
 int expand_set_cursorlineopt(optexpand_T *args, int *numMatches, char_u ***matches);
 char *did_set_debug(optset_T *args);
 int expand_set_debug(optexpand_T *args, int *numMatches, char_u ***matches);
+char *did_set_diffanchors(optset_T *args);
 char *did_set_diffopt(optset_T *args);
 int expand_set_diffopt(optexpand_T *args, int *numMatches, char_u ***matches);
 char *did_set_display(optset_T *args);
index 2108c2161424d5a643a4c3b1243c3d5d1eddc751..e3c69ebe3b5fef04063932c4235a1636e596d933 100644 (file)
@@ -3385,6 +3385,9 @@ struct file_buffer
     char_u     *b_p_tc;        // 'tagcase' local value
     unsigned   b_tc_flags;     // flags for 'tagcase'
     char_u     *b_p_dict;      // 'dictionary' local value
+#ifdef FEAT_DIFF
+    char_u     *b_p_dia;       // 'diffanchors' local value
+#endif
     char_u     *b_p_tsr;       // 'thesaurus' local value
 #ifdef FEAT_COMPL_FUNC
     char_u     *b_p_tsrfu;     // 'thesaurusfunc' local value
@@ -3577,9 +3580,11 @@ struct file_buffer
  * and how many lines it occupies in that buffer.  When the lines are missing
  * in the buffer the df_count[] is zero.  This is all counted in
  * buffer lines.
- * There is always at least one unchanged line in between the diffs (unless
- * linematch is used).  Otherwise it would have been included in the diff above
- * or below it.
+ * Usually there is always at least one unchanged line in between the diffs as
+ * otherwise it would have been included in the diff above or below it.  When
+ * linematch or diff anchors are used, this is no longer guaranteed, and we may
+ * have adjacent diff blocks.  In all cases they will not overlap, although it
+ * is possible to have multiple 0-count diff blocks at the same line.
  * df_lnum[] + df_count[] is the lnum below the change.  When in one buffer
  * lines have been inserted, in the other buffer df_lnum[] is the line below
  * the insertion and df_count[] is zero.  When appending lines at the end of
diff --git a/src/testdir/dumps/Test_diff_anchors_00.dump b/src/testdir/dumps/Test_diff_anchors_00.dump
new file mode 100644 (file)
index 0000000..3e9a45f
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|A|1| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @19||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|B| @15||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|B| @14||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|B| @14
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0|3| @19||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0|3| @18||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0|3| @18
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|3| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|5| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|5| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|2+0&#ffd7ff255| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+|~+0&#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_01.dump b/src/testdir/dumps/Test_diff_anchors_01.dump
new file mode 100644 (file)
index 0000000..0e07236
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0@1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0@1| @18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|1| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|B| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|2+2&#ff404010| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|3+2&#ff404010| +0&#ffd7ff255@18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|B| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|3| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|4| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|5| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A|1+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A|2+2&#ff404010| +0&#ffd7ff255@13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A|3+2&#ff404010| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @21||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @20||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @20
+| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @21||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @20||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @20
+| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @21||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @20||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @20
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0@1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|B| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|3| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|4| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|5| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+|X+3#0000000#ffffff0|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_02.dump b/src/testdir/dumps/Test_diff_anchors_02.dump
new file mode 100644 (file)
index 0000000..590be2f
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0@1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0@1| @18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A+2&#ff404010|1| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B+2&#ff404010| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|3| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|3| +0&#ffd7ff255@18
+| +0#0000e05#a8a8a8255@1|2+2#0000000#ff404010| +0&#ffd7ff255@21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|5| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0@1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A+2&#ff404010|2| +0&#ffd7ff255@13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A+2&#ff404010|3| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|3| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|5| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_03.dump b/src/testdir/dumps/Test_diff_anchors_03.dump
new file mode 100644 (file)
index 0000000..8b1fa83
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|A|1| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @19||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|1| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|1| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|B| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|2+2&#ff404010| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|2+2&#ff404010| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|3+2&#ff404010| +0&#ffd7ff255@18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|B| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|3| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|4| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|5| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A+2&#ff404010|2| +0&#ffd7ff255@13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A+2&#ff404010|3| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|3| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|5| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_04.dump b/src/testdir/dumps/Test_diff_anchors_04.dump
new file mode 100644 (file)
index 0000000..4a67729
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0@1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0@1| @18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B| @14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|3| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|3| @18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|4| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|5| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A|1+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A|2+2&#ff404010| +0&#ffd7ff255@13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|A|3+2&#ff404010| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @21||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @20||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @20
+| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @21||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @20||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @20
+| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @21||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @20||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @20
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0@1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|B| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|3| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|4| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|5| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+|X+3#0000000#ffffff0|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_05.dump b/src/testdir/dumps/Test_diff_anchors_05.dump
new file mode 100644 (file)
index 0000000..3e9a45f
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|A|1| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @19||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|B| @15||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|B| @14||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|B| @14
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0|3| @19||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0|3| @18||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0|3| @18
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|3| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|5| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|5| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|2+0&#ffd7ff255| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+|~+0&#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_06.dump b/src/testdir/dumps/Test_diff_anchors_06.dump
new file mode 100644 (file)
index 0000000..d36006d
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|A|1| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @19||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0@1| @18
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|1| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|2| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|B| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|3| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|4| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|5| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B| @14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|B| @14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|3| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0|3| @18
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|3| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|5| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|2+0&#ffd7ff255| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010| +0&#ffd7ff255@20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+|X+3#0000000#ffffff0|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|1|,|1| @5|T|o|p| |X|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_07.dump b/src/testdir/dumps/Test_diff_anchors_07.dump
new file mode 100644 (file)
index 0000000..310fa65
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|1| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0@1| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0@1| +0&#ffd7ff255@18
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010| +0&#ffd7ff255@21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|1| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|B| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @21||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0@1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|1| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|2| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|B| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|2| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|3| +0&#ffd7ff255@18
+| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255|0|3| @19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|B| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+2#0000000#ff404010|n|c|h|o|r|A|3| +0&#ffd7ff255@13
+| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|5| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|0+2&#ff404010|3| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255| @20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|4| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|2+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+2#0000000#ff404010|0|5| +0&#ffd7ff255@18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|3+2#0000000#ff404010| +0&#ffd7ff255@20
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#5fd7ff255|n|c|h|o|r|A|2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|2+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|3+0#0000000#5fd7ff255| @20||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+|~+0&#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X+3&&|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_01.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_01.dump
new file mode 100644 (file)
index 0000000..a0ffa9f
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|1| @27||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|1| @27
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|a| @28
+| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|1|a| @28||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|1|,|1| @11|A|l@1| |X+3&&|d|i|f|i|l|e|2| @10|1|,|1| @11|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_02.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_02.dump
new file mode 100644 (file)
index 0000000..9e5c9dc
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|a| @28
+| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|1|a| @28||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1>a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|3|,|1| @11|B|o|t| |X+3&&|d|i|f|i|l|e|2| @10|3|,|1| @11|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_03.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_03.dump
new file mode 100644 (file)
index 0000000..76f8617
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|1|a| @28||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1>a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|3|,|1| @11|B|o|t| |X+3&&|d|i|f|i|l|e|2| @10|3|,|1| @11|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_04.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_04.dump
new file mode 100644 (file)
index 0000000..1c069d8
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1>a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|3|,|1| @11|B|o|t| |X+3&&|d|i|f|i|l|e|2| @10|3|,|1| @11|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_05.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_05.dump
new file mode 100644 (file)
index 0000000..87bbc57
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|1| @27||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|1| @27
+| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|1|a| @28||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|a| @28
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|1|,|1| @11|A|l@1| |X+3&&|d|i|f|i|l|e|2| @10|1|,|1| @11|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_06.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_06.dump
new file mode 100644 (file)
index 0000000..1f5917c
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|1|a| @28||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|a| @28
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1>a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|3|,|1| @11|B|o|t| |X+3&&|d|i|f|i|l|e|2| @10|3|,|1| @11|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_07.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_07.dump
new file mode 100644 (file)
index 0000000..1c069d8
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|n|c|h|o|r|2| @27||+1&&| +0#0000e05#a8a8a8255@1>a+0#0000000#ffffff0|n|c|h|o|r|2| @27
+|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|~| @35||+1#0000000&|~+0#4040ff13&| @35
+|X+1#0000000&|d|i|f|i|l|e|1| @10|3|,|1| @11|B|o|t| |X+3&&|d|i|f|i|l|e|2| @10|3|,|1| @11|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_08.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_08.dump
new file mode 100644 (file)
index 0000000..aadabe0
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|a+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|a+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|b| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|c+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|c+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X+3&&|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_09.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_09.dump
new file mode 100644 (file)
index 0000000..050b522
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|b| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|c+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|c+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1>a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_10.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_10.dump
new file mode 100644 (file)
index 0000000..8d786f3
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|c+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|c+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1>a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_11.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_11.dump
new file mode 100644 (file)
index 0000000..78bc679
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+| +0#0000e05#a8a8a8255@1>a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X+1&&|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_12.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_12.dump
new file mode 100644 (file)
index 0000000..5f14a8f
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1>a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+3#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|B|o|t| |X+1&&|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_13.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_13.dump
new file mode 100644 (file)
index 0000000..99cb0de
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|a+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|a+0&#ffd7ff255| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|2|b| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|c+0&#ffd7ff255| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|c+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|1|,|1| @5|A|l@1| |X+3&&|d|i|f|i|l|e|3| @3|1|,|1| @5|A|l@1
+|:+0&&> @73
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_14.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_14.dump
new file mode 100644 (file)
index 0000000..3c35c77
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|c+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|c+0&#ffd7ff255| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&| +0#0000e05#a8a8a8255@1>d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X+3&&|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_15.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_15.dump
new file mode 100644 (file)
index 0000000..432cadb
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|2+2&#ff404010|d+0&#ffd7ff255| @15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|d+0#0000000#ffd7ff255|i|f@1|3+2&#ff404010|d+0&#ffd7ff255| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&| +0#0000e05#a8a8a8255@1>d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X+3&&|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_16.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_16.dump
new file mode 100644 (file)
index 0000000..b95c266
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|3+2&#ff404010| +0&#ffd7ff255@14
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&| +0#0000e05#a8a8a8255@1>d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X+3&&|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_17.dump b/src/testdir/dumps/Test_diff_anchors_scrollbind_topline_17.dump
new file mode 100644 (file)
index 0000000..7daaf7a
--- /dev/null
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|1+2&#ff404010| +0&#ffd7ff255@15||+1&#ffffff0| +0#0000e05#a8a8a8255@1|a+0#0000000#ffd7ff255|n|c|h|o|r|2+2&#ff404010| +0&#ffd7ff255@14||+1&#ffffff0| +0#0000e05#a8a8a8255@1>d+0#0000000#5fd7ff255|i|f@1|3|e| @15
+|~+0#4040ff13#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
+|X+1#0000000&|d|i|f|i|l|e|1| @4|1|,|1| @5|A|l@1| |X|d|i|f|i|l|e|2| @3|5|,|1| @5|B|o|t| |X+3&&|d|i|f|i|l|e|3| @3|5|,|1| @5|B|o|t
+| +0&&@74
index e54fe266701e0acdd3aac15d7f0caaf6960ea718..d8f23e84bdb99a543a0df24bb46fff3e6ce2cc8c 100644 (file)
@@ -1,13 +1,13 @@
 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@22||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@21||+1&&| +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@21
 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c|o|m@1|o|n| |l|i|n|e| @9||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c|o|m@1|o|n| |l|i|n|e| @8||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c|o|m@1|o|n| |l|i|n|e| @8
 | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@1|<@6| |H|E|A|D| @7||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
-| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|A@2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|A@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
-| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|A@2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|A@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
-| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|A@2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|A@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|A@2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|A@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|A@2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|A@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
+| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|A@2| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|A@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
 | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@1|=@6| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
-| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|B@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|B@2| @12
-| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|B@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|B@2| @12
-| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|B@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@5|B@2| @12
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|B@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|B@2| @12
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|B@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|B@2| @12
+| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|B@2| @12||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|B@2| @12
 | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@22||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@1|>@6| |b|r|a|n|c|h|1| @4||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@21
 |~+0&#ffffff0| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
 |~| @23||+1#0000000&|~+0#4040ff13&| @22||+1#0000000&|~+0#4040ff13&| @22
index 26b729c769468cbaa4390abb42d5b3fb517a26b1..7e6776acc885e60e3307af1ffe5ccad4e28f1e9c 100644 (file)
@@ -17,4 +17,4 @@
 |~| @35||+1#0000000&|~+0#4040ff13&| @35
 |~| @35||+1#0000000&|~+0#4040ff13&| @35
 |X+3#0000000&|d|i|f|i|l|e|1| @10|1|,|1| @11|A|l@1| |X+1&&|d|i|f|i|l|e|2| @10|1|,|1| @11|A|l@1
-|"+0&&|X|d|i|f|i|l|e|2|"| |3|L|,| |1|2|B| @56
+|:+0&&| @73
index 6af3fb0d83e0002fb912a8918fb47aa2844cc941..dc5dcc9a5e60a611b5b7617b092327d716c777e5 100644 (file)
@@ -2859,7 +2859,14 @@ func Test_linematch_diff()
       \ ['!',
       \ 'abc d!',
       \ 'd!'])
+  call term_sendkeys(buf, ":\<CR>") " clear cmdline
   call VerifyScreenDump(buf, 'Test_linematch_diff1', {})
+
+  " test that filler is always implicitly set by linematch
+  call term_sendkeys(buf, ":set diffopt-=filler\<CR>")
+  call term_sendkeys(buf, ":\<CR>") " clear cmdline
+  call VerifyScreenDump(buf, 'Test_linematch_diff1', {})
+
   " clean up
   call StopVimInTerminal(buf)
 endfunc
@@ -3072,4 +3079,440 @@ func Test_linematch_3diffs_sanity_check()
   " clean up
   call StopVimInTerminal(buf)
 endfunc
+
+func Test_diffanchors()
+  CheckScreendump
+  call WriteDiffFiles3(0,
+      \ ["anchorA1", "1", "2", "3",
+      \  "100", "101", "102", "anchorB", "103", "104", "105"],
+      \ ["100", "101", "102", "anchorB", "103", "104", "105",
+      \  "anchorA2", "1", "2", "3"],
+      \ ["100", "anchorB", "103",
+      \  "anchorA3", "1", "2", "3"])
+  let buf = RunVimInTerminal('-d Xdifile1 Xdifile2 Xdifile3', {})
+
+  " Simple diff without any anchors
+  call VerifyInternal(buf, "Test_diff_anchors_00", "")
+
+  " Setting diffopt+=anchor or diffanchors without the other won't do anything
+  call VerifyInternal(buf, "Test_diff_anchors_00", " diffopt+=anchor")
+  call VerifyInternal(buf, "Test_diff_anchors_00", " dia=1/anchorA/")
+
+  " Use a single anchor by specifying a pattern. Test both internal and
+  " external diff to make sure both paths work.
+  call VerifyBoth(buf, "Test_diff_anchors_01", " dia=1/anchorA/ diffopt+=anchor")
+
+  " Use 2 anchors. They should be sorted by line number, so in file 2/3
+  " anchorB is used before anchorA.
+  call VerifyBoth(buf, "Test_diff_anchors_02", " dia=1/anchorA/,1/anchorB/ diffopt+=anchor")
+
+  " Set marks and specify addresses using marks and repeat the test
+  call term_sendkeys(buf, ":2wincmd w\<CR>:1/anchorA/mark a\<CR>")
+  call term_sendkeys(buf, ":1/anchorB/mark b\<CR>")
+  call term_sendkeys(buf, ":3wincmd w\<CR>:1/anchorA/mark a\<CR>")
+  call term_sendkeys(buf, ":1/anchorB/mark b\<CR>")
+  call term_sendkeys(buf, ":1wincmd w\<CR>:1/anchorA/mark a\<CR>")
+  call term_sendkeys(buf, ":1/anchorB/mark b\<CR>")
+
+  call VerifyInternal(buf, "Test_diff_anchors_01", " dia='a diffopt+=anchor")
+  call VerifyInternal(buf, "Test_diff_anchors_02", " dia='a,'b diffopt+=anchor")
+
+  " Update marks to point somewhere else. When we first set the mark the diff
+  " won't be updated until we manually invoke :diffupdate.
+  call VerifyInternal(buf, "Test_diff_anchors_01", " dia='a diffopt+=anchor")
+  call term_sendkeys(buf, ":1wincmd w\<CR>:1/anchorB/mark a\<CR>:")
+  call term_wait(buf)
+  call VerifyScreenDump(buf, "Test_diff_anchors_01", {})
+  call term_sendkeys(buf, ":diffupdate\<CR>:")
+  call term_wait(buf)
+  call VerifyScreenDump(buf, "Test_diff_anchors_03", {})
+
+  " Use local diff anchors with line numbers, and repeat the same test
+  call term_sendkeys(buf, ":2wincmd w\<CR>:setlocal dia=8\<CR>")
+  call term_sendkeys(buf, ":3wincmd w\<CR>:setlocal dia=4\<CR>")
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=1\<CR>")
+  call VerifyInternal(buf, "Test_diff_anchors_01", " diffopt+=anchor")
+  call term_sendkeys(buf, ":2wincmd w\<CR>:setlocal dia=8,4\<CR>")
+  call term_sendkeys(buf, ":3wincmd w\<CR>:setlocal dia=4,2\<CR>")
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=1,8\<CR>")
+  call VerifyInternal(buf, "Test_diff_anchors_02", " diffopt+=anchor")
+
+  " Test multiple diff anchors on the same line in file 1.
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=1,1\<CR>")
+  call VerifyInternal(buf, "Test_diff_anchors_04", " diffopt+=anchor")
+
+  " Test that if one file has fewer diff anchors than others. Vim should only
+  " use the minimum in this case.
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=8\<CR>")
+  call VerifyInternal(buf, "Test_diff_anchors_05", " diffopt+=anchor")
+
+  " $+1 should anchor everything past the last line
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=$+1\<CR>")
+  call VerifyInternal(buf, "Test_diff_anchors_06", " diffopt+=anchor")
+
+  " Sorting of diff anchors should work with multiple anchors
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=1,10,8,2\<CR>")
+  call term_sendkeys(buf, ":2wincmd w\<CR>:setlocal dia=1,2,3,4\<CR>")
+  call term_sendkeys(buf, ":3wincmd w\<CR>:setlocal dia=4,3,2,1\<CR>")
+  call VerifyInternal(buf, "Test_diff_anchors_07", " diffopt+=anchor")
+
+  " Intentionally set an invalid anchor with wrong line number. Should fall
+  " back to treat it as if no anchors are used at all.
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=1,10,8,2,1000 | silent! diffupdate\<CR>:")
+  call VerifyScreenDump(buf, "Test_diff_anchors_00", {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
+" Test that scrollbind and topline calculations work correctly, even when diff
+" anchors create adjacent diff blocks which complicates the calculations.
+func Test_diffanchors_scrollbind_topline()
+  CheckScreendump
+
+  " Simple overlapped line anchored to be adjacent to each other
+  call WriteDiffFiles(0,
+      \ ["anchor1", "diff1a", "anchor2"],
+      \ ["anchor1", "diff2a", "anchor2"])
+  let buf = RunVimInTerminal('-d Xdifile1 Xdifile2', {})
+
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=2\<CR>")
+  call term_sendkeys(buf, ":2wincmd w\<CR>:setlocal dia=3\<CR>")
+
+  call VerifyInternal(buf, "Test_diff_anchors_scrollbind_topline_01", " diffopt+=anchor")
+  call term_sendkeys(buf, "\<Esc>\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_02", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_03", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_04", {})
+
+  " Also test no-filler
+  call term_sendkeys(buf, "gg")
+  call VerifyInternal(buf, "Test_diff_anchors_scrollbind_topline_05", " diffopt+=anchor diffopt-=filler")
+  call term_sendkeys(buf, "\<Esc>\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_06", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_07", {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
+func Test_diffanchors_scrollbind_topline2()
+  CheckScreendump
+
+  " More-complicated case with 3 files and multiple overlapping diff blocks
+  call WriteDiffFiles3(0,
+      \ ["anchor1"],
+      \ ["diff2a", "diff2b", "diff2c", "diff2d", "anchor2"],
+      \ ["diff3a", "diff3c", "diff3d", "anchor3", "diff3e"])
+  let buf = RunVimInTerminal('-d Xdifile1 Xdifile2 Xdifile3', {})
+
+  call term_sendkeys(buf, ":1wincmd w\<CR>:setlocal dia=1,1,2\<CR>")
+  call term_sendkeys(buf, ":2wincmd w\<CR>:setlocal dia=3,5,6\<CR>")
+  call term_sendkeys(buf, ":3wincmd w\<CR>:setlocal dia=2,4,5\<CR>")
+
+  call VerifyInternal(buf, "Test_diff_anchors_scrollbind_topline_08", " diffopt+=anchor")
+  call term_sendkeys(buf, ":1wincmd w\<CR>")
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_09", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_10", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_11", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_12", {})
+
+  " Also test no-filler
+  call term_sendkeys(buf, ":3wincmd w\<CR>gg")
+  call VerifyInternal(buf, "Test_diff_anchors_scrollbind_topline_13", " diffopt+=anchor diffopt-=filler")
+  call term_sendkeys(buf, "\<Esc>\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_14", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_15", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_16", {})
+  call term_sendkeys(buf, "\<C-E>")
+  call VerifyScreenDump(buf, "Test_diff_anchors_scrollbind_topline_17", {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
+" Test that setting 'diffanchors' will update the diff.
+func Test_diffanchors_option_set_update()
+  set diffanchors='a diffopt=internal,filler,anchor
+
+  " Set up 3 tabs that share some buffers, and set up marks on each of them.
+  " We want to make sure only relevant tabs are updated if buffer-local diff
+  " anchors are updated, but all tabs should refresh if global diff anchors
+  " are updated (see diffanchors_changed() in code).
+
+  " Tab 1. A buffer here will be reused.
+  call setline(1, range(1, 10))
+  3mark a
+  4mark b
+  diffthis
+  new
+  call setline(1, range(21, 25))
+  let buf = bufnr()
+  1mark a
+  2mark b
+  diffthis
+  call assert_equal(2, diff_filler(1))
+  call assert_equal(0, diff_filler(2))
+
+  " Tab 2. "buf" is here but intentionally not participating in diff.
+  tabnew
+  exec 'buf ' .. buf
+  diffoff
+  new
+  call setline(1, range(31, 40))
+  8mark a
+  9mark b
+  diffthis
+  new
+  call setline(1, range(41, 50))
+  5mark a
+  6mark b
+  diffthis
+
+  call assert_equal(3, diff_filler(5))
+  call assert_equal(0, diff_filler(6))
+  call assert_equal(0, diff_filler(7))
+
+  " Update mark a location, and check that the diff has *not* updated. When
+  " updating marks diff's won't automatically update.
+  7mark a
+  call assert_equal(3, diff_filler(5))
+  call assert_equal(0, diff_filler(6))
+  call assert_equal(0, diff_filler(7))
+
+  " Tab 3. "buf" is used here and also in a diff.
+  tabnew
+  call setline(1, range(51, 65))
+  10mark a
+  11mark b
+  diffthis
+  exec 'sbuffer ' .. buf
+  diffthis
+
+  " Change local diff anchor of "buf" to mark b
+  setlocal diffanchors='b
+
+  " Tab 1 should immediately update the diff to use mark b because the buf
+  " local diff anchor has been changed in "buf".
+  1tabnext
+  call assert_equal(0, diff_filler(1))
+  call assert_equal(1, diff_filler(2))
+
+  " Tab 2 should not immediately update because "buf" is not a diff buffer
+  " here.
+  2tabnext
+  call assert_equal(3, diff_filler(5))
+  call assert_equal(0, diff_filler(6))
+  call assert_equal(0, diff_filler(7))
+
+  " Manual diff update would refresh the diff since we previously changed mark
+  " a's location above.
+  diffupdate
+  call assert_equal(0, diff_filler(5))
+  call assert_equal(0, diff_filler(6))
+  call assert_equal(1, diff_filler(7))
+
+  " Go back to tab 1. Reset diff anchor to global value and make sure it uses
+  " mark a again.
+  1tabnext
+  set diffanchors<
+  call assert_equal(2, diff_filler(1))
+  call assert_equal(0, diff_filler(2))
+
+  " Now, change the global diff anchor to mark b. This should affect all tabs
+  " including tab 2 which should update automatically.
+  set diffanchors='b
+  call assert_equal(0, diff_filler(1))
+  call assert_equal(2, diff_filler(2))
+
+  2tabnext
+  call assert_equal(0, diff_filler(5))
+  call assert_equal(3, diff_filler(6))
+  call assert_equal(0, diff_filler(7))
+
+  %bw!
+  set diffopt&
+  set diffanchors&
+endfunc
+
+" Test that using diff anchors with window/buffer-local addresses will work as
+" expected and use the relevant window/buffer instead of curbuf/curwin.
+func Test_diffanchors_buf_win_local_addresses()
+  " Win 1-3 point to buffer 1. Set up different window-specific jump history
+  " Win 2 is the one we activate diff mode on.
+  call setline(1, range(1, 15))
+  norm 2gg
+  norm 3gg
+
+  split
+  norm 4gg
+  norm 5gg
+
+  split
+  norm 11gg
+  norm 12gg
+  call setline(10, 'new text 1') " update the '. mark to line 10
+
+  " Win 4 points to buffer 2
+  botright vert new
+  call setline(1, range(101, 110))
+  norm 8gg
+  norm 9gg
+  call setline(3, 'new text 2') " update the '. mark to line 3
+
+  2wincmd w
+  diffthis
+  4wincmd w
+  diffthis
+
+  " Test buffer-local marks using '. Should be anchored to lines 10 / 3.
+  set diffopt=internal,filler,anchor
+  set diffanchors='.
+  4wincmd w
+  call assert_equal(7, diff_filler(3))
+
+  " Test window-local marks using '' Should be anchored to lines 4 / 8.
+  " Note that windows 1 & 3 point to the buffer being diff'ed but are not used
+  " for diffing themselves and therefore should not be used. Windows 2 & 4
+  " should be used.
+  set diffanchors=''
+  2wincmd w
+  call assert_equal(4, diff_filler(4))
+
+  " Also test "." for the current cursor position, which is also
+  " window-specific. Make sure the cursor position at the longer file doesn't
+  " result in the other file using out of bounds line number.
+  4wincmd w
+  norm G
+  2wincmd w
+  norm G
+  set diffanchors=.
+  diffupdate
+  4wincmd w
+  call assert_equal(5, diff_filler(10))
+
+  %bw!
+  set diffopt&
+  set diffanchors&
+endfunc
+
+" Test diff anchors error handling for anchors that fail to resolve to a line.
+" These are not handled during option parsing because they depend on the
+" specifics of the buffer at diff time.
+func Test_diffanchors_invalid()
+  call setline(1, range(1, 5))
+  new
+  call setline(1, range(11, 20))
+  set diffopt=internal,filler,anchor
+  windo diffthis
+  1wincmd w
+
+  " Line numbers that are out of bounds should be an error
+  set diffanchors=0
+  call assert_fails('diffupdate', 'E16:')
+  set diffanchors=1
+  diffupdate
+  set diffanchors=$
+  diffupdate
+  set diffanchors=$+1
+  diffupdate
+  set diffanchors=$+2
+  call assert_fails('diffupdate', 'E16:')
+
+  " Test that non-existent marks in any one buffer will be detected
+  set diffanchors='a
+  call assert_fails('diffupdate', 'E20:')
+  2mark a
+  call assert_fails('diffupdate', 'E20:')
+
+  set diffanchors=1
+  setlocal diffanchors='a
+  diffupdate
+
+  set diffanchors<
+  windo 2mark a
+  set diffanchors='b
+  call assert_fails('diffupdate', 'E20:')
+  set diffanchors='a
+  diffupdate
+
+  " File marks are ok to use for anchors only if it is in the same file
+  1wincmd w
+  3mark C
+  setlocal diffanchors='C
+  diffupdate
+  set diffanchors='C
+  call assert_fails('diffupdate', 'E20:')
+
+  " Buffer-local marks also can only be used in buffers that have them.
+  set diffanchors=1
+  exec "norm 1ggVj\<Esc>"
+  setlocal diffanchors='<
+  diffupdate
+  set diffanchors='<
+  call assert_fails('diffupdate', 'E20:')
+
+  " Pattern search that failed will be an error too
+  let @/='orig_search_pat'
+  set diffanchors=1/5/
+  diffupdate
+  call assert_equal('orig_search_pat', @/) " also check we don't pollute the search register
+  set diffanchors=1/does_not_exist/
+  call assert_fails('diffupdate', 'E1550:')
+  call assert_equal('orig_search_pat', @/)
+
+  %bw!
+  set diffopt&
+  set diffanchors&
+endfunc
+
+" Test diffget/diffput behaviors when using diff anchors which could create
+" adjacent diff blocks.
+func Test_diffget_diffput_diffanchors()
+  set diffanchors=1/anchor/
+  set diffopt=internal,filler,anchor
+
+  call setline(1, ['1', 'anchor1', '4'])
+  diffthis
+  new
+  call setline(1, ['2', '3', 'anchor2', '4', '5'])
+  diffthis
+  wincmd w
+
+  " Test using no-range diffget. It should grab the closest diff block only,
+  " even if there are multiple adjacent blocks.
+  2
+  diffget
+  call assert_equal(['1', 'anchor2', '4'], getline(1, '$'))
+  diffget
+  call assert_equal(['2', '3', 'anchor2', '4'], getline(1, '$'))
+
+  " Test using a range to get/put all the adjacent diff blocks.
+  1,$delete
+  call setline(1, ['anchor1', '4'])
+  0,1 diffget
+  call assert_equal(['2', '3', 'anchor2', '4'], getline(1, '$'))
+
+  1,$delete
+  call setline(1, ['anchor1', '4'])
+  0,$+1 diffget
+  call assert_equal(['2', '3', 'anchor2', '4', '5'], getline(1, '$'))
+
+  1,$delete
+  call setline(1, ['anchor1', '4'])
+  0,1 diffput
+  wincmd w
+  call assert_equal(['anchor1', '4', '5'], getline(1,'$'))
+
+  %bw!
+  set diffopt&
+  set diffanchors&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index af097a29553affd4900b9de010b7f2ddbb6cf3ce..6ea8ff65f165451e2f4eaac00dcc2d13aa547a3a 100644 (file)
@@ -290,13 +290,13 @@ endfun
 
 func Test_set_completion()
   call feedkeys(":set di\<C-A>\<C-B>\"\<CR>", 'tx')
-  call assert_equal('"set dictionary diff diffexpr diffopt digraph directory display', @:)
+  call assert_equal('"set dictionary diff diffanchors diffexpr diffopt digraph directory display', @:)
 
   call feedkeys(":setlocal di\<C-A>\<C-B>\"\<CR>", 'tx')
-  call assert_equal('"setlocal dictionary diff diffexpr diffopt digraph directory display', @:)
+  call assert_equal('"setlocal dictionary diff diffanchors diffexpr diffopt digraph directory display', @:)
 
   call feedkeys(":setglobal di\<C-A>\<C-B>\"\<CR>", 'tx')
-  call assert_equal('"setglobal dictionary diff diffexpr diffopt digraph directory display', @:)
+  call assert_equal('"setglobal dictionary diff diffanchors diffexpr diffopt digraph directory display', @:)
 
   " Expand boolean options. When doing :set no<Tab> Vim prefixes the option
   " names with "no".
@@ -348,7 +348,7 @@ func Test_set_completion()
   call assert_match(' ./samples/.* ./test10.in', @:)
 
   call feedkeys(":set tags=./\\\\ dif\<C-A>\<C-B>\"\<CR>", 'tx')
-  call assert_equal('"set tags=./\\ diff diffexpr diffopt', @:)
+  call assert_equal('"set tags=./\\ diff diffanchors diffexpr diffopt', @:)
 
   " Expand files with spaces/commas in them. Make sure we delimit correctly.
   "
@@ -733,7 +733,7 @@ func Test_set_completion_string_values()
   set diffopt=
   call assert_equal([], getcompletion('set diffopt-=', 'cmdline'))
   " Test all possible values
-  call assert_equal(['filler', 'context:', 'iblank', 'icase', 'iwhite', 'iwhiteall', 'iwhiteeol', 'horizontal',
+  call assert_equal(['filler', 'anchor', 'context:', 'iblank', 'icase', 'iwhite', 'iwhiteall', 'iwhiteeol', 'horizontal',
         \ 'vertical', 'closeoff', 'hiddenoff', 'foldcolumn:', 'followwrap', 'internal', 'indent-heuristic', 'algorithm:', 'inline:', 'linematch:'],
         \ getcompletion('set diffopt=', 'cmdline'))
   set diffopt&
index 34de7a7d9f5c76c78015b2470ecd7ed7b6638277..22bc352033c9ad35d7bac7152c2ed5fe931cdbd2 100644 (file)
@@ -182,12 +182,17 @@ let test_values = {
       \                'line,number'],
       \                ['', 'xxx', 'line,screenline']],
       \ 'debug': [['', 'msg', 'throw', 'beep'], ['xxx']],
+      \ 'diffanchors': [['', "'a", '/foo/', "'a-1,'>,/foo,xxx/,'b,123",
+      \                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20',
+      \                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,'],
+      \                [',',  '12,,34', 'xxx', '123,xxx',
+      \                '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21']],
       \ 'diffopt': [['', 'filler', 'context:0', 'context:999', 'iblank',
       \                'icase', 'iwhite', 'iwhiteall', 'horizontal', 'vertical',
       \                'closeoff', 'hiddenoff', 'foldcolumn:0', 'foldcolumn:12',
       \                'followwrap', 'internal', 'indent-heuristic', 'algorithm:myers',
       \                'icase,iwhite', 'algorithm:minimal', 'algorithm:patience',
-      \                'algorithm:histogram', 'inline:none', 'inline:simple',
+      \                'anchor', 'algorithm:histogram', 'inline:none', 'inline:simple',
       \                'inline:char', 'inline:word', 'inline:char,inline:word', 'linematch:5'],
       \                ['xxx', 'foldcolumn:', 'foldcolumn:x', 'foldcolumn:xxx',
       \                'linematch:', 'linematch:x', 'linematch:xxx', 'algorithm:',
index 4120e910fadfa68c17897edb37a2a1a28ab84e74..d2710bc1a426f96bfd5316eea043ec0a3c185666 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1557,
 /**/
     1556,
 /**/