mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 02:36:18 +08:00 
			
		
		
		
	Prefer string variant for source-list-line-color config option (#2676)
The string variant is more powerful and can be passed directly to "echo -e" / "printf" and friends. Remove the mention of the integer variant from the default config. This makes the option appear more consistent with other color options. The user shouldn't care about the historic differences.
This commit is contained in:
		 Johannes Altmanninger
					Johannes Altmanninger
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							47d07e095c
						
					
				
				
					commit
					45f44bc218
				
			| @ -53,9 +53,8 @@ type Config struct { | |||||||
| 	// expression for its argument. | 	// expression for its argument. | ||||||
| 	ShowLocationExpr bool `yaml:"show-location-expr"` | 	ShowLocationExpr bool `yaml:"show-location-expr"` | ||||||
|  |  | ||||||
| 	// Source list line-number color (3/4 bit color codes as defined | 	// Source list line-number color, as a terminal escape sequence. | ||||||
| 	// here: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors), | 	// For historic reasons, this can also be an integer color code. | ||||||
| 	// or a string containing a terminal escape sequence. |  | ||||||
| 	SourceListLineColor interface{} `yaml:"source-list-line-color"` | 	SourceListLineColor interface{} `yaml:"source-list-line-color"` | ||||||
|  |  | ||||||
| 	// Source list arrow color, as a terminal escape sequence. | 	// Source list arrow color, as a terminal escape sequence. | ||||||
| @ -228,11 +227,10 @@ func writeDefaultConfig(f *os.File) error { | |||||||
| # This is the default configuration file. Available options are provided, but disabled. | # This is the default configuration file. Available options are provided, but disabled. | ||||||
| # Delete the leading hash mark to enable an item. | # Delete the leading hash mark to enable an item. | ||||||
|  |  | ||||||
| # Uncomment the following line and set your preferred ANSI foreground color | # Uncomment the following line and set your preferred ANSI color for source | ||||||
| # for source line numbers in the (list) command (if unset, default is 34, | # line numbers in the (list) command. The default is 34 (dark blue). See | ||||||
| # dark blue) See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit | # https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit | ||||||
| # Alternatively a string containing an escape sequence can also be used. | # source-list-line-color: "\x1b[34m" | ||||||
| # source-list-line-color: 34 |  | ||||||
|  |  | ||||||
| # Uncomment the following lines to change the colors used by syntax highlighting. | # Uncomment the following lines to change the colors used by syntax highlighting. | ||||||
| # source-list-keyword-color: "\x1b[0m" | # source-list-keyword-color: "\x1b[0m" | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user