Mercurial > vim
comparison src/testdir/test_popup.vim @ 12883:058e93aee621 v8.0.1318
patch 8.0.1318: terminal balloon only shows one line
commit https://github.com/vim/vim/commit/246fe03d154c09070d5b7365b7f61716c4e0ddd4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 19 19:56:27 2017 +0100
patch 8.0.1318: terminal balloon only shows one line
Problem: Terminal balloon only shows one line.
Solution: Split into several lines in a clever way. Add balloon_split().
Make balloon_show() accept a list in the terminal.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 19 Nov 2017 20:00:06 +0100 |
parents | c1347c968d31 |
children | ffc7004e9041 |
comparison
equal
deleted
inserted
replaced
12882:53c7865ec6aa | 12883:058e93aee621 |
---|---|
701 augroup END | 701 augroup END |
702 augroup! MyBufAdd | 702 augroup! MyBufAdd |
703 bw! | 703 bw! |
704 endfunc | 704 endfunc |
705 | 705 |
706 func Test_balloon_split() | |
707 call assert_equal([ | |
708 \ 'one two three four one two three four one two thre', | |
709 \ 'e four', | |
710 \ ], balloon_split( | |
711 \ 'one two three four one two three four one two three four')) | |
712 | |
713 call assert_equal([ | |
714 \ 'struct = {', | |
715 \ ' one = 1,', | |
716 \ ' two = 2,', | |
717 \ ' three = 3}', | |
718 \ ], balloon_split( | |
719 \ 'struct = {one = 1, two = 2, three = 3}')) | |
720 | |
721 call assert_equal([ | |
722 \ 'struct = {', | |
723 \ ' one = 1,', | |
724 \ ' nested = {', | |
725 \ ' n1 = "yes",', | |
726 \ ' n2 = "no"}', | |
727 \ ' two = 2}', | |
728 \ ], balloon_split( | |
729 \ 'struct = {one = 1, nested = {n1 = "yes", n2 = "no"} two = 2}')) | |
730 call assert_equal([ | |
731 \ 'struct = 0x234 {', | |
732 \ ' long = 2343 "\\"some long string that will be wr', | |
733 \ 'apped in two\\"",', | |
734 \ ' next = 123}', | |
735 \ ], balloon_split( | |
736 \ 'struct = 0x234 {long = 2343 "\\"some long string that will be wrapped in two\\"", next = 123}')) | |
737 endfunc | |
738 | |
706 " vim: shiftwidth=2 sts=2 expandtab | 739 " vim: shiftwidth=2 sts=2 expandtab |