comparison src/testdir/color_ramp.vim @ 20053:89364104be93 v8.2.0582

patch 8.2.0582: color ramp test does not show text colors Commit: https://github.com/vim/vim/commit/b4a549fb161a390834371db8370b1f75695e25d0 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 15 21:44:11 2020 +0200 patch 8.2.0582: color ramp test does not show text colors Problem: Color ramp test does not show text colors. Solution: Add a row of 16 text colors and 16 bold text colors.
author Bram Moolenaar <Bram@vim.org>
date Wed, 15 Apr 2020 21:45:03 +0200
parents 2d54f1e7ba0f
children
comparison
equal deleted inserted replaced
20052:787f6e567b83 20053:89364104be93
1 " Script to generate a file that shows al 256 xterm colors 1 " Script to generate a file that shows al 256 xterm colors
2 2
3 new 3 new
4 call setline(1, 'ANSI') 4 let lnum = 1
5
6 " | in original color pair to see white background.
7 let trail_bar = "\033[m|"
5 8
6 " ANSI colors 9 " ANSI colors
10 call setline(lnum, 'ANSI background')
11 let lnum += 1
12
7 let s = '' 13 let s = ''
8 for nr in range(0, 7) 14 for nr in range(0, 7)
9 let s .= "\033[4" . nr . "m " 15 let s .= "\033[4" . nr . "m "
10 endfor 16 endfor
11 for nr in range(8, 15) 17 for nr in range(8, 15)
12 let s .= "\033[10" . (nr - 8) . "m " 18 let s .= "\033[10" . (nr - 8) . "m "
13 endfor 19 endfor
14 " Add | in original color pair to see white background. 20 let s .= trail_bar
15 let s .= "\033[m|" 21
16 call setline(2, s) 22 call setline(lnum, s)
23 let lnum += 1
24
25 " ANSI text colors
26 call setline(lnum, 'ANSI text')
27 let lnum += 1
28
29 let s = ''
30 for nr in range(0, 7)
31 let s .= "\033[0;3" . nr . "mxxxx"
32 endfor
33 for nr in range(8, 15)
34 let s .= "\033[0;9" . (nr - 8) . "mxxxx"
35 endfor
36 let s .= trail_bar
37
38 call setline(lnum, s)
39 let lnum += 1
40
41 " ANSI with bold text
42 call setline(lnum, 'ANSI bold text')
43 let lnum += 1
44
45 let s = ''
46 for nr in range(0, 7)
47 let s .= "\033[1;3" . nr . "mxxxx"
48 endfor
49 for nr in range(8, 15)
50 let s .= "\033[1;9" . (nr - 8) . "mxxxx"
51 endfor
52 let s .= trail_bar
53
54 call setline(lnum, s)
55 let lnum += 1
17 56
18 " 6 x 6 x 6 color cube 57 " 6 x 6 x 6 color cube
19 call setline(3, 'color cube') 58 call setline(lnum, 'color cube')
59 let lnum += 1
60
20 for high in range(0, 5) 61 for high in range(0, 5)
21 let s = '' 62 let s = ''
22 for low in range(0, 35) 63 for low in range(0, 35)
23 let nr = low + high * 36 64 let nr = low + high * 36
24 let s .= "\033[48;5;" . (nr + 16) . "m " 65 let s .= "\033[48;5;" . (nr + 16) . "m "
25 endfor 66 endfor
26 let s .= "\033[m|" 67 let s .= trail_bar
27 call setline(high + 4, s) 68 call setline(lnum + high, s)
28 endfor 69 endfor
70 let lnum += 6
29 71
30 " 24 shades of grey 72 " 24 shades of grey
31 call setline(10, 'grey ramp') 73 call setline(lnum, 'grey ramp')
74 let lnum += 1
75
32 let s = '' 76 let s = ''
33 for nr in range(0, 23) 77 for nr in range(0, 23)
34 let s .= "\033[48;5;" . (nr + 232) . "m " 78 let s .= "\033[48;5;" . (nr + 232) . "m "
35 endfor 79 endfor
36 let s .= "\033[m|" 80 let s .= trail_bar
37 call setline(11, s) 81 call setline(lnum, s)
38 82
39 set binary 83 set binary
40 write! <sfile>:h/color_ramp.txt 84 write! <sfile>:h/color_ramp.txt
41 quit 85 quit