Projects STRLCPY fzf Commits 7a7cfcac
🤬
  • ■ ■ ■ ■ ■ ■
    CHANGELOG.md
    skipped 13 lines
    14 14   fzf --preview 'cat {}' --preview-window '<50(hidden)'
    15 15   ```
    16 16  - Use SGR mouse mode to support larger terminals
     17 +- You can now use characters that does not satisfy `unicode.IsGraphic` constraint
     18 + for `--marker`, `--pointer`, and `--ellipsis`. Allows Nerd Fonts and stuff.
     19 + Use at your own risk.
    17 20  - Bug fixes and improvements
    18 21  - Shell extension
    19 22   - `kill` completion now requires trigger sequence (`**`) for consistency
    skipped 1220 lines
  • ■ ■ ■ ■ ■ ■
    src/options.go
    skipped 1306 lines
    1307 1307   validateJumpLabels := false
    1308 1308   validatePointer := false
    1309 1309   validateMarker := false
    1310  - validateEllipsis := false
    1311 1310   for i := 0; i < len(allArgs); i++ {
    1312 1311   arg := allArgs[i]
    1313 1312   switch arg {
    skipped 181 lines
    1495 1494   opts.HeaderFirst = false
    1496 1495   case "--ellipsis":
    1497 1496   opts.Ellipsis = nextString(allArgs, &i, "ellipsis string required")
    1498  - validateEllipsis = true
    1499 1497   case "--preview":
    1500 1498   opts.Preview.command = nextString(allArgs, &i, "preview command required")
    1501 1499   case "--no-preview":
    skipped 93 lines
    1595 1593   opts.HeaderLines = atoi(value)
    1596 1594   } else if match, value := optString(arg, "--ellipsis="); match {
    1597 1595   opts.Ellipsis = value
    1598  - validateEllipsis = true
    1599 1596   } else if match, value := optString(arg, "--preview="); match {
    1600 1597   opts.Preview.command = value
    1601 1598   } else if match, value := optString(arg, "--preview-window="); match {
    skipped 56 lines
    1658 1655   errorExit(err.Error())
    1659 1656   }
    1660 1657   }
    1661  - 
    1662  - if validateEllipsis {
    1663  - for _, r := range opts.Ellipsis {
    1664  - if !unicode.IsGraphic(r) {
    1665  - errorExit("invalid character in ellipsis")
    1666  - }
    1667  - }
    1668  - }
    1669 1658  }
    1670 1659   
    1671 1660  func validateSign(sign string, signOptName string) error {
    1672 1661   if sign == "" {
    1673 1662   return fmt.Errorf("%v cannot be empty", signOptName)
    1674  - }
    1675  - for _, r := range sign {
    1676  - if !unicode.IsGraphic(r) {
    1677  - return fmt.Errorf("invalid character in %v", signOptName)
    1678  - }
    1679 1663   }
    1680 1664   if runewidth.StringWidth(sign) > 2 {
    1681 1665   return fmt.Errorf("%v display width should be up to 2", signOptName)
    skipped 96 lines
  • ■ ■ ■ ■ ■ ■
    src/options_test.go
    skipped 452 lines
    453 453   {"😀", true},
    454 454   {"", false},
    455 455   {">>>", false},
    456  - {"\n", false},
    457  - {"\t", false},
    458 456   }
    459 457   
    460 458   for _, testCase := range testCases {
    skipped 11 lines
Please wait...
Page is in error, reload to recover