mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-10 12:23:48 -05:00
Do not allow gutter characters with width other than 1
This commit is contained in:
@@ -3412,16 +3412,9 @@ func validateOptions(opts *Options) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.Gutter != nil {
|
if opts.Gutter != nil && uniseg.StringWidth(*opts.Gutter) != 1 ||
|
||||||
if err := validateSign(*opts.Gutter, "gutter", 1); err != nil {
|
opts.GutterRaw != nil && uniseg.StringWidth(*opts.GutterRaw) != 1 {
|
||||||
return err
|
return errors.New("gutter display width should be 1")
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if opts.GutterRaw != nil {
|
|
||||||
if err := validateSign(*opts.GutterRaw, "gutter", 1); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.Scrollbar != nil {
|
if opts.Scrollbar != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user