vim-patch:9.1.1252: typos in code and docs related to 'diffopt' "inline:" (#33143)

Problem:  Typos in code and docs related to 'diffopt' "inline:".
          (after v9.1.1243)
Solution: Fix typos and slightly improve the docs.
          (zeertzjq)

closes: vim/vim#16997

5a307c361c
This commit is contained in:
zeertzjq
2025-03-29 07:01:49 +08:00
committed by GitHub
parent f4ee0ab2f1
commit cb31663663
6 changed files with 14 additions and 15 deletions

View File

@ -231,12 +231,11 @@ The diffs are highlighted with these groups:
highlight the exact difference between the highlight the exact difference between the
two. Will respect any 'diffopt' flag that two. Will respect any 'diffopt' flag that
affects internal diff. affects internal diff.
Not used when `inline:` set to "none". Not used when `inline:` is set to "none".
|hl-DiffTextAdd| DiffTextAdd Added text inside a Changed line. Similar to |hl-DiffTextAdd| DiffTextAdd Added text inside a Changed line. Similar to
DiffText, but used when there is no DiffText, but used when there is no
corresponding text in other buffers. Will not corresponding text in other buffers. Not used
be used when `inline:` is set to "simple" or when `inline:` is set to "simple" or "none".
"none".
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines, |hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
because they don't really exist in this because they don't really exist in this
buffer. buffer.

View File

@ -2125,8 +2125,8 @@ A jump table for the options with a short description can be found at |Q_op|.
none Do not perform inline highlighting. none Do not perform inline highlighting.
simple Highlight from first different simple Highlight from first different
character to the last one in each character to the last one in each
line. This is the default if nothing line. This is the default if no
is set. `inline:` value is set.
char Use internal diff to perform a char Use internal diff to perform a
character-wise diff and highlight the character-wise diff and highlight the
difference. difference.

View File

@ -1722,8 +1722,8 @@ vim.go.dex = vim.go.diffexpr
--- none Do not perform inline highlighting. --- none Do not perform inline highlighting.
--- simple Highlight from first different --- simple Highlight from first different
--- character to the last one in each --- character to the last one in each
--- line. This is the default if nothing --- line. This is the default if no
--- is set. --- `inline:` value is set.
--- char Use internal diff to perform a --- char Use internal diff to perform a
--- character-wise diff and highlight the --- character-wise diff and highlight the
--- difference. --- difference.

View File

@ -777,7 +777,7 @@ struct diffblock_S {
typedef struct diffline_change_S diffline_change_T; typedef struct diffline_change_S diffline_change_T;
struct diffline_change_S { struct diffline_change_S {
colnr_T dc_start[DB_COUNT]; ///< byte offset of start of range in the line colnr_T dc_start[DB_COUNT]; ///< byte offset of start of range in the line
colnr_T dc_end[DB_COUNT]; ///< 1 paste byte offset of end of range in line colnr_T dc_end[DB_COUNT]; ///< 1 past byte offset of end of range in line
int dc_start_lnum_off[DB_COUNT]; ///< starting line offset int dc_start_lnum_off[DB_COUNT]; ///< starting line offset
int dc_end_lnum_off[DB_COUNT]; ///< end line offset int dc_end_lnum_off[DB_COUNT]; ///< end line offset
}; };

View File

@ -2279,8 +2279,8 @@ local options = {
none Do not perform inline highlighting. none Do not perform inline highlighting.
simple Highlight from first different simple Highlight from first different
character to the last one in each character to the last one in each
line. This is the default if nothing line. This is the default if no
is set. `inline:` value is set.
char Use internal diff to perform a char Use internal diff to perform a
character-wise diff and highlight the character-wise diff and highlight the
difference. difference.

View File

@ -2212,8 +2212,8 @@ func Test_diff_inline()
" on a different line. " on a different line.
call WriteDiffFiles(buf, call WriteDiffFiles(buf,
\ ["abcdefghijklmno", "anchor1", \ ["abcdefghijklmno", "anchor1",
\ "abcdefghijklmno", "anchor2", \ "abcdefghijklmno", "anchor2",
\ "abcdefghijklmno", "anchor3", \ "abcdefghijklmno", "anchor3",
\ "test", "multiline"], \ "test", "multiline"],
\ ["a?c?e?g?i?k???o", "anchor1", \ ["a?c?e?g?i?k???o", "anchor1",
\ "a??de?????klmno", "anchor2", \ "a??de?????klmno", "anchor2",
@ -2254,7 +2254,7 @@ func Test_diff_inline_multibuffer()
call WriteDiffFiles3(buf, call WriteDiffFiles3(buf,
\ ["That is buffer1.", "anchor", "Some random text", "anchor"], \ ["That is buffer1.", "anchor", "Some random text", "anchor"],
\ ["This is buffer2.", "anchor", "Some text", "anchor", "buffer2/3"], \ ["This is buffer2.", "anchor", "Some text", "anchor", "buffer2/3"],
\ ["This is buffer3. Last.", "anchor", "Some more", "text here.", "anchor", "only in buffer2/3", "not in buffer1"]) \ ["This is buffer3. Last.", "anchor", "Some more", "text here.", "anchor", "only in buffer2/3", "not in buffer1"])
call VerifyInternal(buf, "Test_diff_inline_multibuffer_01", " diffopt+=inline:char") call VerifyInternal(buf, "Test_diff_inline_multibuffer_01", " diffopt+=inline:char")
" Close one of the buffers and make sure it updates correctly " Close one of the buffers and make sure it updates correctly