view src/testdir/test_global.vim @ 16660:04c2614af21c v8.1.1332

patch 8.1.1332: cannot flush listeners without redrawing, mix of changes commit https://github.com/vim/vim/commit/fe1ade0a78a70a4c7ddaebb6964497f037f4997a Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 14 21:20:36 2019 +0200 patch 8.1.1332: cannot flush listeners without redrawing, mix of changes Problem: Cannot flush change listeners without also redrawing. The line numbers in the list of changes may become invalid. Solution: Add listener_flush(). Invoke listeners before adding a change that makes line numbers invalid.
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 May 2019 21:30:06 +0200
parents 8e5ec22db3d8
children b8fd7364befd
line wrap: on
line source


func Test_yank_put_clipboard()
  new
  call setline(1, ['a', 'b', 'c'])
  set clipboard=unnamed
  g/^/normal yyp
  call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6))

  set clipboard&
  bwipe!
endfunc

func Test_nested_global()
  new
  call setline(1, ['nothing', 'found', 'found bad', 'bad'])
  call assert_fails('g/found/3v/bad/s/^/++/', 'E147')
  g/found/v/bad/s/^/++/
  call assert_equal(['nothing', '++found', 'found bad', 'bad'], getline(1, 4))
  bwipe!
endfunc