Mercurial > vim
comparison src/testdir/test_breakindent.vim @ 18017:988e5a868b60 v8.1.2004
patch 8.1.2004: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/f6ed61e1489e40eada55a4f1782e1ed82bcad7d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 7 19:05:09 2019 +0200
patch 8.1.2004: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Sep 2019 19:15:04 +0200 |
parents | af3d441845cd |
children | 3ebb15e3c28d |
comparison
equal
deleted
inserted
replaced
18016:834b7854aa3c | 18017:988e5a868b60 |
---|---|
422 endif | 422 endif |
423 " test strdisplaywidth() | 423 " test strdisplaywidth() |
424 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4') | 424 call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4') |
425 let text = getline(2) | 425 let text = getline(2) |
426 let width = strlen(text[1:]) + 2->indent() + strlen(&sbr) * 3 " text wraps 3 times | 426 let width = strlen(text[1:]) + 2->indent() + strlen(&sbr) * 3 " text wraps 3 times |
427 call assert_equal(width, strdisplaywidth(text)) | 427 call assert_equal(width, text->strdisplaywidth()) |
428 call s:close_windows('set sbr= vts&') | 428 call s:close_windows('set sbr= vts&') |
429 endfunc | 429 endfunc |
430 | 430 |
431 func Test_breakindent12() | 431 func Test_breakindent12() |
432 " test breakindent with long indent | 432 " test breakindent with long indent |