diff options
author | James McCoy <jamessan@jamessan.com> | 2017-02-06 10:20:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-06 10:20:49 -0500 |
commit | 11efbc80e328d6e92bdb1cdcf6aeac98050c2077 (patch) | |
tree | ffd45f3dab501339999687416c8a3a1e577d899f /src/nvim/diff.c | |
parent | a767fee8cd0e6874e528d88f5a8dcf70259dabdd (diff) | |
parent | b0cf071d437699b9b89e3735b3df41914f302eb1 (diff) | |
download | rneovim-11efbc80e328d6e92bdb1cdcf6aeac98050c2077.tar.gz rneovim-11efbc80e328d6e92bdb1cdcf6aeac98050c2077.tar.bz2 rneovim-11efbc80e328d6e92bdb1cdcf6aeac98050c2077.zip |
Merge pull request #5913 from mhinz/buf-lookup-patches
vim-patch:7.4.2017,7.4.2018,7.4.2021,7.4.2022,7.4.2023,7.4.2024
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index f7b96ba3e1..aafd50687e 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -1004,7 +1004,8 @@ theend: void ex_diffsplit(exarg_T *eap) { win_T *old_curwin = curwin; - buf_T *old_curbuf = curbuf; + bufref_T old_curbuf; + set_bufref(&old_curbuf, curbuf); // don't use a new tab page, each tab page has its own diffs cmdmod.tab = 0; @@ -1022,10 +1023,10 @@ void ex_diffsplit(exarg_T *eap) if (win_valid(old_curwin)) { diff_win_options(old_curwin, true); - if (buf_valid(old_curbuf)) { + if (bufref_valid(&old_curbuf)) { // Move the cursor position to that of the old window. curwin->w_cursor.lnum = diff_get_corresponding_line( - old_curbuf, + old_curbuf.br_buf, old_curwin->w_cursor.lnum, curbuf, curwin->w_cursor.lnum); |