Commit Graph

27 Commits

Author SHA1 Message Date
zeertzjq
86458dde0e
vim-patch:9.1.0103: 'breakindentopt' "min" not correct with 'signcolumn' (#27451)
Problem:  'breakindentopt' "min" works incorrectly with 'signcolumn'.
Solution: Use win_col_off() and win_col_off2().
          (zeertzjq)

closes: vim/vim#14014

f0a9d65e0a
2024-02-13 07:33:24 +08:00
Lewis Russell
795f896a57 test: rename (meths, funcs) -> (api, fn) 2024-01-12 18:59:14 +00:00
Lewis Russell
c30f2e3182 test: typing for helpers.meths 2024-01-12 13:01:06 +00:00
Justin M. Keyes
04f2f864e2 refactor: format test/* 2024-01-03 02:09:29 +01:00
zeertzjq
1037ce2e46 test: avoid repeated screen lines in expected states
This is the command invoked repeatedly to make the changes:

    :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
2023-12-09 22:15:02 +08:00
zeertzjq
06ff540e1c
vim-patch:9.0.2151: 'breakindent' is not drawn after diff filler lines (#26412)
Problem:  'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.

closes: vim/vim#13624

588f20dece

Cherry-pick Test_diff_with_syntax() change from patch 9.0.1257.
2023-12-06 07:16:02 +08:00
bfredl
0081549547 refactor(change): do API changes to buffer without curbuf switch
Most of the messy things when changing a non-current buffer is
not about the buffer, it is about windows. In particular, it is about
`curwin`.

When editing a non-current buffer which is displayed in some other
window in the current tabpage, one such window will be "borrowed" as the
curwin. But this means if two or more non-current windows displayed the buffers,
one of them will be treated differenty. this is not desirable.

In particular, with nvim_buf_set_text, cursor _column_ position was only
corrected for one single window. Two new tests are added: the test
with just one non-current window passes, but the one with two didn't.

Two corresponding such tests were also added for nvim_buf_set_lines.
This already worked correctly on master, but make sure this is
well-tested for future refactors.

Also, nvim_create_buf no longer invokes autocmds just because you happened
to use `scratch=true`. No option value was changed, therefore OptionSet
must not be fired.
2023-08-26 12:02:05 +02:00
zeertzjq
62ecb05957
vim-patch:9.0.1506: line number not displayed when using 'smoothscroll' (#23453)
Problem:    Line number not displayed when using 'smoothscroll'.
Solution:   Adjust condition for showing the line number. (closes vim/vim#12333)

88bb3e0a48
2023-05-03 07:21:09 +08:00
zeertzjq
ae64772a88
fix(diff): avoid restoring invalid 'foldcolumn' value (#21650)
Use "0" for 'foldcolumn' when w_p_fdc_save is empty, like how
"manual" is used for 'foldmethod' when w_p_fdm_save is empty.
2023-01-05 07:12:02 +08:00
Jonathon
04fbb1de44
Enable new diff option linematch (#14537)
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-11-04 09:07:22 +00:00
zeertzjq
611b43369e vim-patch:8.2.5155: in diff mode windows may get out of sync
Problem:    In diff mode windows may get out of sync. (Gary Johnson)
Solution:   Avoid that the other window scrolls for 'cursorbind'.
a315ce1f32
2022-07-25 20:30:35 +08:00
Famiu Haque
bbf58e6bbc refactor(ui)!: link VertSplit to Normal by default
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06:00
zeertzjq
2c7dc648ca
vim-patch:8.2.3925: diff mode confused by NUL bytes (#18033)
Problem:    Diff mode confused by NUL bytes.
Solution:   Handle NUL bytes differently. (Christian Brabandt, closes vim/vim#9421,
            closes vim/vim#9418)
06f6095623
2022-04-08 10:45:42 +08:00
zeertzjq
2adc24b18b test: add a Lua screen test for CursorLineNr in diff mode
Remove a useless test added in #14190
2022-03-08 10:11:20 +08:00
zeertzjq
b326bf5f41 fix(screen): do not draw filler lines post eof if already at last row 2021-12-07 23:19:56 +08:00
Jaehwang Jerry Jung
bb79e05f81
vim-patch:8.2.3556: filler lines are incorrect for other window in diff mode (#16164)
Problem:    Filler lines are incorrect for other window in diff mode after
            making a change.
Solution:   Copy filler lines from the current window. (closes vim/vim#8809)
841c225b9e
2021-10-28 22:04:57 -04:00
Jaehwang Jerry Jung
de406f651c
vim-patch:8.2.3394: filler lines are wrong when changing text in diff mode (#15547)
Problem:    Filler lines are wrong when changing text in diff mode.
Solution:   Don't change the filler lines on every change.  Check
            scrollbinding when updating the filler lines. (closes vim/vim#8809)
04626c243c
2021-09-18 12:38:58 -04:00
zeertzjq
56b437a6c7 vim-patch:8.1.2117: CursorLine highlight used while 'cursorline' is off
Problem:    CursorLine highlight used while 'cursorline' is off.
Solution:   Check 'cursorline' is set. (cloes vim/vim#5017)
49474ca122
2021-08-02 05:41:17 +08:00
Matthieu Coudron
e0d0e46cf2 chore: add test for CursorLineNr with filler lines 2021-03-22 23:33:17 +01:00
Matthieu Coudron
f2e1709d49 fix: stop using CursorLineNr in front of fillers
filling lines in diff mode.
2021-03-22 23:33:17 +01:00
Jan Edmund Lazo
ed41ac08cf
vim-patch:8.2.1004: line numbers below filler lines not always updated
Problem:    Line numbers below filler lines not always updated.
Solution:   Don't break out of the win_line() loop too early. (Christian
            Brabandt, closes vim/vim#6294, closes vim/vim#6138)
511feec6f0
2020-08-02 12:00:00 -04:00
Daniel Hahler
6807779c68
tests: make 'win_update redraws lines properly' more readable (#11068) 2019-09-22 14:58:38 +02:00
Daniel Hahler
1070c092c7
win_update: fix redraw regression (#11027)
Before 6e9ea5adc `win_ins_lines` would return `FAIL` for `i/line_count == 0`.

Handle this by checking it in the outer `if`.

Ref: https://github.com/neovim/neovim/commit/6e9ea5ad#commitcomment-35084669
2019-09-18 18:22:38 +02:00
Marco Hinz
d9de4c0efb
vim-patch:8.1.1072: extending sign and foldcolumn below the text is confusing (#9816)
Problem:    Extending sign and foldcolumn below the text is confusing.
Solution:   Let the sign and foldcolumn stop at the last text line, just like
            the line number column.  Also stop the command line window leader.
            (Christian Brabandt)

8ee4c01b8c

Closes https://github.com/neovim/neovim/issues/9613
2019-04-03 10:48:47 +02:00
Anatolii Sakhnik
4e29810817 vim-patch:8.1.0562: parsing of 'diffopt' is slightly wrong
Problem:    Parsing of 'diffopt' is slightly wrong.
Solution:   Fix the parsing and add a test. (Jason Franklin, Christian
            Brabandt)

b6fc72851c
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
972ad11195 vim-patch:8.1.0393: not all white space difference options available
Problem:    Not all white space difference options available.
Solution:   Add "iblank", "iwhiteall" and "iwhiteeol" to 'diffopt'.

785fc6567f
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
cf1ffa9166 vim-patch:8.1.0360: using an external diff program is slow and inflexible
Problem:    Using an external diff program is slow and inflexible.
Solution:   Include the xdiff library. (Christian Brabandt)
            Use it by default.

e828b7621c

vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
2018-12-09 19:45:56 +02:00