view src/testdir/test_charsearch_utf8.vim @ 32568:cb1af9880f6d v9.0.1616

patch 9.0.1616: quickfix text field is truncated Commit: https://github.com/vim/vim/commit/5bf042810b19a627eda2f170624a0cfd7b4f6ed6 Author: Shane Harper <shane@shaneharper.net> Date: Wed Jun 7 19:09:57 2023 +0100 patch 9.0.1616: quickfix text field is truncated Problem: Quickfix text field is truncated. Solution: Fix output of text field after pattern field in quickfix buffer. (Shane Harper, closes #12498)
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Jun 2023 20:15:04 +0200
parents f5946a50c931
children 448aef880252
line wrap: on
line source

" Tests for related f{char} and t{char} using utf-8.

" Test for t,f,F,T movement commands
func Test_search_cmds()
  new!
  call setline(1, "・最初から最後まで最強のVimは最高")
  1
  normal! f最
  call assert_equal([0, 1, 4, 0], getpos('.'))
  normal! ;
  call assert_equal([0, 1, 16, 0], getpos('.'))
  normal! 2;
  call assert_equal([0, 1, 43, 0], getpos('.'))
  normal! ,
  call assert_equal([0, 1, 28, 0], getpos('.'))
  call assert_equal('最', getcharsearch().char)
  call setcharsearch({'char' : ''})
  call assert_equal('', getcharsearch().char)
  call assert_beeps('normal ;')
  call assert_equal([0, 1, 28, 0], getpos('.'))
  call assert_beeps('normal ,')
  call assert_equal([0, 1, 28, 0], getpos('.'))
  bw!
endfunc

" vim: shiftwidth=2 sts=2 expandtab