diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-20 17:26:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-20 17:26:44 +0800 |
commit | ff5cfcdeab2446459ab59d44ce173ef811902c49 (patch) | |
tree | 2cad932a46390cb0d5821f13aa39f30b5be11770 /src/nvim/diff.c | |
parent | 1cc4706e94489498b12c4844c1b3a2e9aa5cc921 (diff) | |
download | rneovim-ff5cfcdeab2446459ab59d44ce173ef811902c49.tar.gz rneovim-ff5cfcdeab2446459ab59d44ce173ef811902c49.tar.bz2 rneovim-ff5cfcdeab2446459ab59d44ce173ef811902c49.zip |
vim-patch:8.1.2045: the option.c file is too big (#19854)
Problem: The option.c file is too big.
Solution: Split off the code dealing with strings. (Yegappan Lakshmanan,
closes vim/vim#4937)
https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea
Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405.
Cherry-pick shift_line() comment change from patch 8.1.2096.
Move 'clipboard' default parsing to didset_string_options().
Reorder option flags to put Nvim-only flags at the end.
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index c1fdbc1b9a..5485d528f7 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -34,6 +34,7 @@ #include "nvim/move.h" #include "nvim/normal.h" #include "nvim/option.h" +#include "nvim/optionstr.h" #include "nvim/os/os.h" #include "nvim/os/shell.h" #include "nvim/path.h" @@ -1407,8 +1408,6 @@ void diff_win_options(win_T *wp, int addbuf) } wp->w_p_wrap = false; } - curwin = wp; // -V519 - curbuf = curwin->w_buffer; if (!wp->w_p_diff) { if (wp->w_p_diff_saved) { @@ -1416,9 +1415,7 @@ void diff_win_options(win_T *wp, int addbuf) } wp->w_p_fdm_save = vim_strsave(wp->w_p_fdm); } - set_string_option_direct("fdm", -1, "diff", OPT_LOCAL | OPT_FREE, 0); - curwin = old_curwin; - curbuf = curwin->w_buffer; + set_string_option_direct_in_win(wp, "fdm", -1, "diff", OPT_LOCAL | OPT_FREE, 0); if (!wp->w_p_diff) { wp->w_p_fen_save = wp->w_p_fen; |