diff options
-rw-r--r-- | .github/workflows/labeler.yml | 2 | ||||
-rw-r--r-- | ci/reviews.js | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_visual.vim | 10 | ||||
-rw-r--r-- | src/nvim/window.c | 6 |
4 files changed, 25 insertions, 1 deletions
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 736b8ae630..d16b382ca7 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -13,10 +13,10 @@ jobs: - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: "" type-scope: runs-on: ubuntu-latest - needs: ["triage"] permissions: contents: write pull-requests: write diff --git a/ci/reviews.js b/ci/reviews.js index 3e8e07976a..25ef08be36 100644 --- a/ci/reviews.js +++ b/ci/reviews.js @@ -17,10 +17,18 @@ module.exports = async ({github, context}) => { reviewers.add("jamessan") } + if (labels.includes('column')) { + reviewers.add("lewis6991") + } + if (labels.includes('diagnostic')) { reviewers.add("gpanders") } + if (labels.includes('diff')) { + reviewers.add("lewis6991") + } + if (labels.includes('distribution')) { reviewers.add("jamessan") } diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index da88293c8e..ae8f9ba70b 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1285,6 +1285,16 @@ func Test_visual_block_insert_round_off() bwipe! endfunc +" this was causing an ml_get error +func Test_visual_exchange_windows() + enew! + new + call setline(1, ['foo', 'bar']) + exe "normal G\<C-V>gg\<C-W>\<C-X>OO\<Esc>" + bwipe! + bwipe! +endfunc + " this was leaving the end of the Visual area beyond the end of a line func Test_visual_ex_copy_line() new diff --git a/src/nvim/window.c b/src/nvim/window.c index e09af7a7bb..1e737d2083 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1727,6 +1727,12 @@ static void win_exchange(long Prenum) (void)win_comp_pos(); // recompute window positions + if (wp->w_buffer != curbuf) { + reset_VIsual_and_resel(); + } else if (VIsual_active) { + wp->w_cursor = curwin->w_cursor; + } + win_enter(wp, true); redraw_later(curwin, NOT_VALID); redraw_later(wp, NOT_VALID); |